0.0.0-rc.13 • Published 11 months ago

@nanoslices/react v0.0.0-rc.13

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@nanoslices/react

React wrapper for @nanoslices/core. Re-export all helpers from Core, but the created stores have a new use property.

Installation

@nanoslices/react depends on @nanoslices/core, refer to @nanoslices/core for its installation instruction.

@nanoslices/react also depends on @nanostores/react as peer dependency, so you need to install it manually if you are not using npm 7 or higher.

npm >= 7

npm install --save @nanoslices/react

npm < 7

npm install --save @nanoslices/react @nanostores/react

yarn

yarn add @nanoslices/react @nanostores/react

Usage

Simply import @nanoslices/react somewhere in your application, preferably in the file from which your store is exported.

After that, a new use method will be made available on your stores.

This hook takes a selector which receives the nanostores stores from the state, and must return one. Internally, it will call @nanostores/react's useStore on the received nanostore, subscribing to updates.

0.0.0-rc.13

11 months ago

0.0.0-rc.12

11 months ago

0.0.0-rc.11

11 months ago

0.0.0-rc.10

11 months ago

0.0.0-rc.9

11 months ago

0.0.0-rc.8

11 months ago

0.0.0-rc.7

11 months ago

0.0.0-rc.6

11 months ago

0.0.0-rc.5

11 months ago

0.0.0-rc.3

11 months ago

0.0.0-rc.2

11 months ago

0.0.0-rc.1

11 months ago