import { useEffect } from 'react'
import useReduxState, { useGetState } from 'use-redux-states'
const Component = () => {
useReduxState({
state: {
state1: 'a',
state2: 'b'
},
path: 'component_state'
})
const getState = useGetState('component_state')
useEffect(() => {
console.log(getState((component_state) => component_state?.state2))
}, [])
}