Quantcast
Channel: What's the equivalent of this.props.history.push in gatsby? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Mehdi Faraji for What's the equivalent of this.props.history.push...

The top answer doesn't work anymore But this does work :import { navigate } from "gatsby" navigate(`/payment/${stripe_plan_id.id}`)

View Article


Answer by ksav for What's the equivalent of this.props.history.push in gatsby?

Gatsby uses reach router. Try the following:import { navigate } from "@reach/router"navigate(`/payment/${stripe_plan_id.id}`)

View Article


What's the equivalent of this.props.history.push in gatsby?

I'm trying to do this.props.history.push("/payment/"+ stripe_plan_id)What is the equivalent of this.props.history.push in Gastby?I get the error TypeError: Cannot read property 'push' of undefined

View Article
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>