Weact bindings for Redux
npm i @bgfist/weact-redux
import {Provider} from "@bgfist/weact-redux";
import store from ...
App(Provider(store)({
onLoad(){},
...
}))
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
}
}