Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "immer"
-
sounds logic, ..does it?
git commit -m "session now holds 'null' as date if equals today. This way a 'today' is always possible, even if yesterday was today and today is now the tomorrow from yesterday"
original german git message: "session hält 'null' als date, wenn gleich heute. So ist ein 'heute' immer möglich, auch wenn gestern heute war und heute mittlerweile das morgen von gestern."
Who finds the startrek reference? -
if anyone is familiar with immer js or immutable js:
if the producer copies the base state to nextState, and nextState is a const, doesnt that defeat the purpose?
I mean you're going for immutability, which is great for say an undo function, or for finding bugs, but what are you doing with all these immutable values now hanging around in memory?
I assume each new state returned is being pushed onto an array? (because you cant stuff it into nextState because nextState is immutable).
Wont this lead to memory usage increasing over a user session, the longer the session lasts?
I feel like I'm misunderstanding some core concept here.
edit: also what the hell is structural sharing?18 -
The state of state management with react sucks ass. The boilerplate for a store with a type parameter is absurd.2