4 ms·
Oh god, this. Using Immutable (via Immstruct) has been glorious, but this has been a minor annoyance that I'll be glad to be rid of. Now all I need to do is so
by donw 12y ago
Oh god, this. Using Immutable (via Immstruct) has been glorious, but this has been a minor annoyance that I'll be glad to be rid of.
Now all I need to do is sort out some issues with dispatch and I'm good to go...
- amccloud 12y agoDoes Immstruct use Immutable's cursors? If so, you'll still need to use .toArray() when dealing with a cursor to an array. React doesn't like what you get after mapping over an IndexedCursor.
- donw 12y agoIt does, but you can just .deref()
- amccloud 12y agoI'm usually looping over cursors I want to pass as a prop to a child component. Deref-ing there would sorta defeat the purpose of cursors.
- donw 12y agoAh, fair enough. I usually deref before handing the data off to the rendering chain, on the basis that future updates will just kick off another render loop.