Skip to content

bgfist/weact-redux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  }
}

About

Weact bindings for Redux

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published