Skip to content

0.4.0 - Collection with Model, useModel and useModelItem

Choose a tag to compare

@andreterron andreterron released this 18 May 21:13
· 13 commits to main since this release

0.4.0

Introducing Model, which represents a collection of objects with the same type.

Added

  • new Model<T>(key): create a model with key as the storage identifier
  • useModel<T>(key): a React hook to create a model and automatically subscribe to its items
  • useModelItem<T>(key, id): a React hook to get an item from a specific model

Links