You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not an issue with the library and more of a how to question but scouring the internet I'm struggling to find anything of use that can be adapted so figured asking here I may get a decent response from the authors / contributors / interested parties.
I am working with an asp.net MVC application that was littered with variables all over various files and essentially being thrown into the global scope. I have experience of React with Redux so thought this would be a great opportunity to tidy up our application state and use a pattern that would give us some boundaries of operation.
I've implemented the toolkit in typescript and willingly placed use of it all over the code base.
I've configured webpack to provide one entry point per html file that is served (including partials)
What I am finding is that the store is created multiple times which from the reading around seems quite logical.
What I would like to do is somehow elevate the store to a single place that each javascript file can access so I only get one instance for the entire application. This may not be best practice but would serve as an improvement to be iterated on in the future.
Currently it feels like the only solution is to move the store to the global scope and access it accordingly from there but before I do that I wanted to ask if there was a better way that this could be achieved.
Apologies for asking an integration question on an issue log; hoping you may be able to offer some advice
The text was updated successfully, but these errors were encountered:
Hi,
This is not an issue with the library and more of a how to question but scouring the internet I'm struggling to find anything of use that can be adapted so figured asking here I may get a decent response from the authors / contributors / interested parties.
I am working with an asp.net MVC application that was littered with variables all over various files and essentially being thrown into the global scope. I have experience of React with Redux so thought this would be a great opportunity to tidy up our application state and use a pattern that would give us some boundaries of operation.
I've implemented the toolkit in typescript and willingly placed use of it all over the code base.
I've configured webpack to provide one entry point per html file that is served (including partials)
What I am finding is that the store is created multiple times which from the reading around seems quite logical.
What I would like to do is somehow elevate the store to a single place that each javascript file can access so I only get one instance for the entire application. This may not be best practice but would serve as an improvement to be iterated on in the future.
Currently it feels like the only solution is to move the store to the global scope and access it accordingly from there but before I do that I wanted to ask if there was a better way that this could be achieved.
Apologies for asking an integration question on an issue log; hoping you may be able to offer some advice
The text was updated successfully, but these errors were encountered: