Yes, We can create a Redux Provider as a wrapper and wrap the component we need,
the redux context will be automatically initialized and provided within that component.
Example By code shown below:-
const IndexPage = () => {
// Implementation
const dispatch = useDispatch()
// ...
// ...
return <Something />;
}
IndexPage.getInitialProps = ({ reduxStore }) => {
// Implementation
const { dispatch } = reduxStore;
// ...
// ...
}
export default withRedux(IndexPage)