I want to redirect after processing the operations file. However, connected-react-router
cannot be used with react-router
v6.
What is a way to resolve this?
operations.ts
import { push } from 'connected-react-router';
export function createMember(data: User) {
return async (dispatch: Dispatch<Action>) => {
// create members
dispatch(push('/members')
}
}
Is there a way to receive store changes in a file on the tsx side and redirect them with useNavigate()
?
Or will it be solved by adding middleware to the store?