Skip to main content

Dispatching work to the Main Thread

Dispatching work to the Main Thread

Use this component to run any action inside the main thread. You should normally use this for something that interacts with the UI.

To get started using it, you must use KmpMainThread.

To run your action in the main thread, use the following:


_3
KmpMainThread.runViaMainThread{
_3
// your action that will run in the main thread
_3
}

Any Required Setup?

None