51: Michel Westrate Wants You To Stop Writing State Reducers

Published: June 20, 2019, noon

How many times have you written a state reducer?\n100 times?\n100 times a month?\n\nTruth is, it's tricky for human brains to write performant state mutations in immutable terms.\n\nMaybe you're whip smart and you've got the theory on lock but the resulting "spread hell" is hard to read and edit long term.\n\nMichel Westrate wants you to stop writing state updates with immutable APIs like spread, concat, and slice and take a second look at mutable APIs like property assignment, forEach, and push. \n\nHe's made it really easy\nAnd the React Team finds this idea very interesting. \n\nWe talk with Michel about this wild of idea of state producers (not reducers) in Immer, why they're in the spirit of React, his MobX fame, and why \u2014 even in 2019 \u2014 it's not a good idea to roll your own state management library.\n\nListen cautiously though.\nAfter this episode, you may never write a state reducer again...