Commit 1f5da0c6 authored by Jeff Avallone's avatar Jeff Avallone

Improving Gatsby rendering solution

Now the form will be prerendered
parent 9a4f669c
Pipeline #43078980 passed with stages
in 3 minutes and 56 seconds
......@@ -146,7 +146,7 @@ class App extends React.PureComponent {
};
return <AppContext.Provider value={ context }>
{ syntax && <Form /> }
<Form />
<Loader />
......
......@@ -20,6 +20,15 @@ class Form extends React.PureComponent {
syntax: this.context.syntax
}
componentDidUpdate() {
if (this.state.expr === undefined && this.state.syntax === undefined) {
this.setState({
syntax: this.context.syntax,
expr: this.context.expr
});
}
}
handleSubmit = event => {
event.preventDefault();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment