microsoft / redux-micro-frontend

This is a library for using Redux to manage state for self-contained apps in a Micro-Frontend architecture. Each self-contained isolated app can have its own isolated and decoupled Redux store. The componentized stores interact with a global store for enabling cross-application communication.
MIT License
344 stars 64 forks source link

add option to get-or-set a store instance #11

Open rotty3000 opened 3 years ago

rotty3000 commented 3 years ago

Is your feature request related to a problem? Please describe. I'm having a hard time integrating redux-developer tools. I can do it, but it's not elegant. In doing so I find that we have to forgo the get-or-set behaviour of the GlobalStore.

Ideas? I started with GlobalStore.Get().CreateStore(...) which behaves as get-or-set like I wish however it does not allow me to use the enhancer parameter of Redux.createStore which means I cannot easily apply the redex developer tools plugin (which is wired via enhancer function) while preserving the get-or-set approach.

Describe the solution you'd like I would like to apply the redux developer tools plugin to stores via the get-or-set methods of the globalStore.

Describe alternatives you've considered I've directly create stores that use the plugin and wired them into the global store. This works just fine but I can't do the same with the GlobalStore.CreateStore

(it's quite possible I'm just not knowledgable enough to do it.)

PS: is there a forum or mail list for this project for usability questions?

patrickCode commented 3 years ago

Have you tried setting GlobalStore.DebugMode=true, and then create the store. When the DebugMode is set to true we will attach the redux-developer-tool automatically. If that doesn't work for you, then I will take a look into it and see if I can provide a get-or-set experience.

patrickCode commented 3 years ago

Also about discussion forum, I have just enabled GitHub Discussions (look for the Discussions tab on the headers). All discussions related to usability shall be discussed there.

rotty3000 commented 3 years ago

@patrickCode I will try to debug option. I had noticed that sometimes redux developer tools could see the store and other times not but I had not correlated this to debug mode. thx! :)

About adding the GitHub discussions thanks for that too :)

patrickCode commented 3 years ago

Did you try the debug option? Did that work for you?

rotty3000 commented 3 years ago

I've had mixed success. I've not had time to really dig into why.