Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank.
Builder content link
e783ff934eb14318aef125431506a1ad
Builder public api key
ccd39cdffef54894b73e153d658f42eb
What are you trying to accomplish
I want to integrate builder on a FAQ page
Screenshots or video link
Code stack you are integrating Builder with
React
Reproducible code example
If you are having integration errors, please link to codesandbox or copy and paste your problematic code here. The more detail the better!
import React from ‘react’
import { BuilderComponent } from ‘@builder.io/react’
import ErrorPage from ‘components/ErrorPage’
import Loader from ‘components/LoadingSpinner’
class CatchallPage extends React.Component {
state = { notFound: false };
render() {
return !this.state.notFound ? (
<BuilderComponent
apiKey="API KEY"
model="page"
contentLoaded={content => {
if (!content) {
this.setState({ notFound: true });
}
}}
>
<Loader />
</BuilderComponent>
) : (
<ErrorPage /> // Your 404 content
);
}
}
export default CatchallPage