Title: reactPress is not defined (again)
Last modified: February 14, 2024

---

# reactPress is not defined (again)

 *  Resolved [ifraimka1](https://wordpress.org/support/users/ifraimka1/)
 * (@ifraimka1)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/reactpress-is-not-defined-again/)
 * I know that this topic has already been resolved, but my problem is still relevant.
   I have the same trouble – [https://wordpress.org/support/topic/reactpress-not-defined/](https://wordpress.org/support/topic/reactpress-not-defined/)
 * There is no `reactPress` var in my `index.html`, “Update Dev-Environment” doesn’t
   help. I don’t understand how should I add `reactPress` var to `index.html`? Can
   I see example of how it should be?
    -  This topic was modified 2 years, 1 month ago by [ifraimka1](https://wordpress.org/support/users/ifraimka1/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [rockiger](https://wordpress.org/support/users/rockiger/)
 * (@rockiger)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/reactpress-is-not-defined-again/#post-17425889)
 * In your `index.html` should be a code block similar to this one:
 *     ```wp-block-code
       <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.

 * ![](https://ps.w.org/reactpress/assets/icon-256x256.png?rev=2471443)
 * [ReactPress - Create React App for Wordpress](https://wordpress.org/plugins/reactpress/)
 * [Support Threads](https://wordpress.org/support/plugin/reactpress/)
 * [Active Topics](https://wordpress.org/support/plugin/reactpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/reactpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/reactpress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [rockiger](https://wordpress.org/support/users/rockiger/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/reactpress-is-not-defined-again/#post-17425889)
 * Status: resolved