Type Immutable Immer Data with TypeScript

Share this video with your friends

Send Tweet

Because the code put in recipe functions is plain, native, mutable JavaScript code, Immer is naturally suited to be used in conjunction of TypeScript (or Flow).

In this lesson we will discover how to combine Immer with TypeScript, and how to type our data types both with simple types and with readonly types.

VmX
VmX
~ a year ago

You could also do Readonly<User> etc.