Overview:
Immstruct is an npm package that serves as a wrapper for Immutable.js. It allows users to easily create cursors that notify when they are updated. This can be advantageous when working with immutable pure components for views, particularly with frameworks like Omniscient or React.js. Immstruct also offers the ability to create references to pieces of data, allowing for the creation of fresh cursors that can retrieve the newest and latest cursor pointing to a specific part of the immutable structure.
Features:
- Wrapper for Immutable.js
- Easy creation of cursors that notify when updated
- Creation of references to pieces of data for fresh cursors
- Ability to retrieve newest and latest cursor pointing to specific part of structure
- Updating a cursor updates the underlying structure
- Similar benefits to Om’s reference cursors
- Listeners that fire when path or sub-cursors change
Installation:
To install the Immstruct npm package, use the following command:
npm install immstruct
After installing, you can import Immstruct into your file using the following code:
import immstruct from 'immstruct';
Summary:
Immstruct is an npm package that serves as a wrapper for Immutable.js. It allows users to easily create cursors that notify when they are updated, making it useful for working with immutable pure components for views. Immstruct also offers the ability to create references to data, allowing for the creation of fresh cursors that can retrieve the newest and latest cursor pointing to a specific part of the structure. Overall, Immstruct provides a convenient and efficient way to work with Immutable.js and manage data updates in a reactive manner.