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 creating an actual flux application which actually does something real with AJAX, the official documentation in this area is lacking in the extreme.
The docs specify that AJAX requests should be conducted in componentDidMount, not in componentWillMount. I'm curious why you've done it there instead?
All the flux examples I've seen have the subscription happening in componentWillMount.
I saw issue #23, but it didn't really make it clear to me why the switch was made. It looked to me like the double rendering was being caused by the component rendering with whatever blank initial state was specified and then rendered again as soon as the server responded with the real content, which updated the store, which caused it to rerender? That's a pattern I've seen a lot with React with and without Flux in my limited exposure so far, it seems perfectly normal.
Thanks for your time.
The text was updated successfully, but these errors were encountered:
Hey,
Thanks for creating an actual flux application which actually does something real with AJAX, the official documentation in this area is lacking in the extreme.
The docs specify that AJAX requests should be conducted in
componentDidMount
, not incomponentWillMount
. I'm curious why you've done it there instead?All the flux examples I've seen have the subscription happening in
componentWillMount
.I saw issue #23, but it didn't really make it clear to me why the switch was made. It looked to me like the double rendering was being caused by the component rendering with whatever blank initial state was specified and then rendered again as soon as the server responded with the real content, which updated the store, which caused it to rerender? That's a pattern I've seen a lot with React with and without Flux in my limited exposure so far, it seems perfectly normal.
Thanks for your time.
The text was updated successfully, but these errors were encountered: