Closed matthall8 closed 6 years ago
Personally, I'd look at using a React ContextProvider. I noticed that on signup that your form is split into three, and going back shows empty fields.
I do this in gatsby-browser.js
:
export const wrapRootElement = ({ element }) => {
const App = () => {
return (
<ApolloProvider client={client}>
<SignupContextProvider>
{element}
</SignupContextProvider>
</ApolloProvider>
)
}
return (<App />)
}
And then you can make a SignupContextProvider and subscribe to its context in your signup form.
Awesome. Thanks for this @stefl - I will look into React context today.
Hi @stefl - any recommendations on how to pass data between pages on Gatsby? The plan right now is to POST to AirTables data at 2 points on the three step form:
This will allow @Rob1Paul to capture leads who have started the form but not completed it and possibly remarket to them.
Any thoughts on how we can pass the data between the pages? We've used Redux in the past but wasn't sure if there's a better way with Gatsby?