Tim Tim - 1 year ago 122
React JSX Question

Flux Utils MapStore

Do I have to manually define my initial state as an immutable map when using Flux's MapStore Util. Or can I return an object and it'll internally make that into an immutable map ?


getInitialState() {

return Immutable.fromJS({
hello: Ted


getInitialState() {

return {
hello: Ted

I'm halfway into a project with the later, and have just realised that my state thinks its changing more than it is :/

Tim Tim
Answer Source

Yep, turns out its up to you to return an Immutable.Map in the getInitialState function.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download