Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 539 Bytes

readme.md

File metadata and controls

34 lines (28 loc) · 539 Bytes

Weact-Redux

Weact bindings for Redux

install

npm i @bgfist/weact-redux

Provider

import {Provider} from "@bgfist/weact-redux";
import store from ...

App(Provider(store)({
  onLoad(){},
  ...
}))

hook-style

import { useSelector, useActionCreator } from "@bgfist/weact-redux";

function Demo() {
  const age = useSelector(state=> state.age);
  const changeAgeAction = useActionCreator(changeAge);

  const onTapSomething = () => changeAgeAction(10);

  return {
    age,
    onTapSomething
  }
}