📜  gatsby 更改页面 url - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:55.350000             🧑  作者: Mango

代码示例1
Use THIS instead of windows.location.replace() to avoid breaking build styling!

import React from "react"
import { navigate } from "gatsby"

const Form = () => (
  
{ event.preventDefault() // TODO: do something with form values navigate("/form-submitted/") }} > {/* (skip form inputs for brevity) */}
)