importReact,{FC}from'react'import{useStore}from'sote'constSoteApp: FC=()=>{// get store// const { count, add, set } = useStore<Store>()// get part of storeconststore=useStore({mapState: (state: State)=>({count: state.count}),mapActions: (actions: Action)=>({add: actions.add,set: actions.setaddAsync: actions.addAsync})})return<App{...store}/>}
importReact,{FC}from'react'// inject part of state and actions from mapState and mapDispatchconstSoteApp: FC=connect({mapState: (state: State)=>({count: state.count}),mapActions: (actions: Action)=>({add: actions.add,set: actions.setaddAsync: actions.addAsync})})(App)// inject all state and actions to AppconstSoteApp: FC=connect<Store>()(App)