Integrate with React sample code seems to have syntax error

-I am integrating with React app created by “npx create-react-app my-app”
-I am following in the tutorial Developer Quickstart - where I used the following REACT code in VSCode from the tutorial to include in the React App Index.js.

import { BuilderComponent, builder, useIsPreviewing } from ‘’;
import { useEffect } from ‘react’;
// Put your API key here

// 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 */}


  • the page can not run because what seems to be syntax errors
    error1- synch is “Unexpected keyword or identifier”
    error2- a missing semicolon “;” after asynh and another one after the curlbrace “{” following asynch in the following part of the code that a consequence of 1st error

    useEffect(() => {
    async fetchContent() {

Thanks for your help

it was resolved in another post

(Getting started with integration using React - #2 by nicke920)