• Resolved mikelehen

    (@mikelehen)


    Apologies if this is a naive question. I’m new to WordPress. I’m building a React app and I’d like to allow people to use easily embed it in their WordPress sites. It seems logical to me to try to distribute it as a WordPress plugin for easy installation.

    Is there a way to “bundle” ReactPress and my React app as a single plugin? As-is it seems like they would need to install the ReactPress plugin and then manually upload my react app to their WordPress file hosting, and I’m not sure all users will have direct file access to their WordPress installation.

    As an experiment I tried putting my React app inside of my wp-content/plugins/reactpress directory instead of wp-content/reactpress but it didn’t work. Is there any reason the React app can’t go inside the plugins directory?

    Thanks!
    Michael

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

    (@rockiger)

    Hey Michael,

    ReactPress isn’t looking into this directory. It was in older version, but this deletes the React app, if somebody is deleting or updating ReactPress.

    It would be an interesting feature, to have an option to export the app as a Plugin for redistribution.

    I will think about it and add to the backlog.

    Meanwhile, I would recommend you the following article https://medium.com/swlh/wordpress-create-react-app-integration-30b41657b79e

    This explains the process of creating a plugin with an React app.

    Do you mind sharing your React app?

    Thread Starter mikelehen

    (@mikelehen)

    Thanks very much for the reply, @rockiger.

    https://medium.com/swlh/wordpress-create-react-app-integration-30b41657b79e looks very interesting. That seems like a good start for what I want to do. It doesn’t cover making react-router work, so it’s not a full replacement for the functionality that I get with ReactPress, but it’s a good start. I think I can probably figure out the routing stuff with a bit of work.

    Sorry but my app isn’t really worth sharing at this point. I’m just playing around with dummy code to see what’s possible. The project I’m working on is building data dashboards in React and we’d like to make them usable in WordPress sites, but we’re pretty early in the project. I am just exploring feasibility.

    Thanks again for the reply and helpful pointer!
    -Michael

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Distributing ReactPress app as a plugin’ is closed to new replies.