Viewing 1 replies (of 1 total)
  • Plugin Author rockiger

    (@rockiger)

    In your index.html should be a code block similar to this one:

    <script>
    var reactPress = {"api":{"nonce":"a8e6e3733b","rest_url":"http:\/\/reactpress.local\/wp-json\/"},"post":{"ID":110,"post_author":"1","post_date":"2022-09-07 21:03:10","post_date_gmt":"2022-09-07 21:03:10","post_content":"<!-- wp:html -->\n<!-- Please don't change. Block is needed for React app. -->\n<noscript>You need to enable JavaScript to run this app.<\/noscript>\n<div id=\"root\"><\/div>\n<!-- \/wp:html -->","post_title":"vite-test","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"vite","to_ping":"","pinged":"","post_modified":"2022-09-07 21:03:10","post_modified_gmt":"2022-09-07 21:03:10","post_content_filtered":"","post_parent":0,"guid":"http:\/\/reactpress.local\/vite\/","menu_order":0,"post_type":"page","post_mime_type":"","comment_count":"0","filter":"raw"},"user":{"data":{},"ID":0,"caps":[],"cap_key":null,"roles":[],"allcaps":[],"filter":null},"usermeta":""};
    </script>

    If not, you can add it to your index.html. Or define reactPress in your JS/TS code for the dev environment.

    Did you already choose a page where you embed your React app? You need to this first.

Viewing 1 replies (of 1 total)
  • The topic ‘reactPress is not defined (again)’ is closed to new replies.