Getting started with integration using React

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

Builder public api key
go to Drag and drop Visual CMS and copy your PUBLIC api key

What are you trying to accomplish
Use the integration tutorial’ of React code in VSCode that flag “async” as "un

Screenshots or video link

Screenshots of your issue, or even better a link to a video of what is happening or what you are trying to accomplish. We love using loom for that sort of thing

Code stack you are integrating Builder with

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 { BuilderComponent, builder, useIsPreviewing } from ‘’;

// Put your API key here
builder.init(‘I removed my API key’)

// set whether you’re using the Visual Editor,
// whether there are changes,
// and render the content if found
export default function CatchAllRoute() {
const isPreviewingInBuilder = useIsPreviewing();
const [notFound, setNotFound] = useState(false);
const [content, setContent] = useState(null);

useEffect( () => {
async fetchContent {
const content = await builder.get(‘page’, {
url: location.pathname


}, [location.pathname]);
// if no page is found, return a 404 page
if (notFound && !isPreviewingInBuilder) {

// return the page when found
return (


{/* Render the Builder page */}


Hi George,

Thank you so much for reaching out! I’d gladly love to assist.

It looks like in the code it is missing calling the fetchContent function from within useEffect() hook. I’ve linked a CodeSandbox link with a working React integration for reference: src/App.js:0-1220

Please let me know if this helps. If this doesn’t work, please share a link to your content and we can take a further look.


Screen Shot 2022-10-17 at 1.22.16 PM

It works … thank you!