• Resolved adt78try

    (@adt78try)


    Hi,
    I created react app and is successfully shown as page in WordPress site. But I want to add react app as component in another page. I tried adding

    <!-- Please don't change. Block is needed for React app. -->
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="react-app-oq"></div>

    in my page. But it does not render the app. I thought div id=root will not work in another page.
    Please guide me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author rockiger

    (@rockiger)

    I am not 100% sure, what you want to do. The page where the react-app is shown must be the page with the slug defined in the ReactPress settings.

    After this page is created. You can change this page however you want, as long as the code snippet above is present.

    Hope this helps.

    Thread Starter adt78try

    (@adt78try)

    Thank you for response!
    Right now Reactpress creates page for the app and we have to modify the page according to our needs.
    But isn’t it possible that once we have app, we could put it in any page as shortcode or resusable block? We may need to put our react form in couple of pages.

    Plugin Author rockiger

    (@rockiger)

    Using one app in more than one is not possible at the moment, sorry. You have to copy the build folder of the app for every place you want to use it.

    I have that on the feature list right now, but I don’t know when I will start with that feature. But I am happy to accept pull requests: https://github.com/rockiger/reactpress/issues/12

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘react app as block in a page’ is closed to new replies.