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
Thanks for this library and the posting Dissection of Flux architecture or how to write your own, it was very helpful.
I am considering using Fluxiny for a project that uses Electron + React. This is my first project that uses React and flux, so I wanted to confirm something before getting going on refactoring to use Fluxiny.
If one has many levels of component nesting, in order to make the store available to child components, it seems like the pattern you have to follow is:
import the store in question, say AppDataStore.js at the entry point the creates the root React component
create a subscriber function with something like let subscriber = createSubscriber(AppDataStore)
then keep passing subscriber function down the component hierarchy as a prop function so each component can subscribe to the store as needed by that component.
Is this correct? I guess the other option might be to:
Thanks for this library and the posting
Dissection of Flux architecture or how to write your own
, it was very helpful.I am considering using Fluxiny for a project that uses Electron + React. This is my first project that uses React and flux, so I wanted to confirm something before getting going on refactoring to use Fluxiny.
If one has many levels of component nesting, in order to make the store available to child components, it seems like the pattern you have to follow is:
AppDataStore.js
at the entry point the creates the root React componentlet subscriber = createSubscriber(AppDataStore)
subscriber
function down the component hierarchy as aprop
function so each component can subscribe to the store as needed by that component.Is this correct? I guess the other option might be to:
Inside each react component module, but looking at the code seems like this will instantiate a completely new Fluxiny dispatcher behind the scenes.
Thanks.
The text was updated successfully, but these errors were encountered: