import { useEffect } from 'react'
import useReduxState, { setState } from 'use-redux-states'
const Component = () => {
const { action } = useReduxState({
state: {
state1: []
},
path: 'todos.completed'
})
useEffect(() => {
console.log(
setState(store.dispatch, action, [1], (state, payload) => [
...state,
payload
])
)
}, [])
}