-
Notifications
You must be signed in to change notification settings - Fork 6
Immutable.js
Tylor Shin edited this page Jun 7, 2018
·
1 revision
Immutable.js is needed for getting secure immutability of the (component)(reducer)'s state object.
However, using Immutable.js with Typescript was a huge burden because we should make all types and mapping functions for converting normal JS object to Immutable.Record.
We tried to use typed-immutable-record for using Typescript as much as we can.
Though, TypeScript has Readonly type definition as default since 1.6 version.
By using Readonly type, it ensures immutability at the compile time as same as that we used Immutable.js in a hacky way.
If you need read more information about this, read Tylor's blog post about this topic.