0.2.12 • Published 6 years ago

@stembord/state-react v0.2.12

Weekly downloads
-
License
(MIT OR Apache-2....
Repository
gitlab
Last release
6 years ago

ts-state-react

connect react components with state stores

Hooks

export const state = new State(INITIAL_STATE);
// Provider and Consumer from Context created with React.createContext
// useState is hook used to map state to props
export const { useState, Provider, Consumer, Context } = createHook(
  state.getState()
);
$ npm run todolist-hooks

Connect

export const state = new State(INITIAL_STATE);
// Provider and Consumer from Context created with React.createContext
// connect is used to map state to props
export const { Context, Provider, Consumer, connect } = createContext(
  state.getState()
);
$ npm run todolist-connect
0.2.12

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago