React: page not redirecting

I’m trying to redirect to a page in react but its not working

                    if(response.ok){
                        return <Redirect to='/' />
                    }

I checked that the if statement is getting triggered

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.