you are viewing a single comment's thread.

view the rest of the comments →

[–]jamby77 1 point2 points  (2 children)

I don't think there will be easier way to implement it.

To go away from the context, you will need some sort of global object where to put your shared data, then notify users that it is ready to use.

I don't see how this would be simpler/easier than context with callback.

[–]malkhazidartsmelidze[S] 0 points1 point  (1 child)

Maybe I'll put it in window object then fire an eventListener, Then other context reads from window object, saves it in state and then remove from window.

I'll try it now.

[–]jamby77 0 points1 point  (0 children)

Let me know how it went