rockiger
Forum Replies Created
-
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] issue with reactpress plugin.[deleted]
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] issue with reactpress plugin.Probably the file structure is different.
Maybe build a dummy app with create-react-app and test it out with it.
Another question: do you have a page with the page slug already? Even in your trashbin?
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] issue with reactpress plugin.Hey @angeloprima1230,
unfortunately, nextjs is not supported. Only create-react-app projects are supported.
Best
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Getting ErrorI will close this. Let’s discuss in the other thread.
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Getting an ErrorThis is odd.
I use
plugin_dir_path()
to create the path. I can’t tell you why the slashes are ommited.I can’t debug this properly, ’cause I don’t have a working Windows system. Sorry.
If you want to investigate the error further. I am happy to accept a pull request.
Best
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] doesnt load assets and cssReactPress doesn’t work this way. You can’t just add a build React app. You need to build it with ReactPress. That is the whole idea behind ReactPress.
Having said that you could try the following:
Assuming you are using create-react-app changing your
package.json
like this and rebuilding should work:"build": "PUBLIC_URL=/wp-content/reactpress/apps/[appname]/build react-scripts build",
If this doesn’t work please stick to the prescribed workflow:
- Install ReactPress on your local WordPress installation
-
Use create-react-app from the command line in the apps folder shown in ReactPress
- Reload ReactPress page and give the app a slug
-
Develop your React app
- Build the app
- Install ReactPress on live WordPress site
- Create the same folder there (no need for create-react-app) there
-
Upload the build folder of your React app into the created folder.
Reload ReactPress page and give the app the SAME slug.
Hope this helps.
Hello @qweezz, sorry that ReactPress is not working as exspected. I never saw something like the error message above. This is all code, that isn’t in the plugin. So the reason must be some interplay between different plugins.
What development system are you using? What other plugins do you have installed?
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Getting an Error@ilan76 As I said, try localWP. It is free and known to work well with ReactPress. Windows Dev-Systems that run on bare metal are not supported by ReactPress, because I can’t test on them.
Do your self a favor and use localWP.
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Getting an ErrorI am sorry, I don’t have any idea what the problem could be. Could you use localWP instead of Xampp and see if the issue persists?
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Use on a blank page?@ilan76 sure, just change the template of the ReactPress app’s page to a blank one.
This page template must be provided by your WordPress theme.
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Security of useEffect?I am not sure if I understand the question right. Why would you keep your API link secret? A quick look into the developer tools will show them.
Having said that, with ReactPress you use a standard create-react-app. You have access to environment variable like with any other React project.
@copernicus Yeah, you are right. The routing feature doesn’t allow for subpages.
Maybe I should make it optional. Thank you bringing this to my attention.
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] CORS policy for reactpress appsThere is nothing special here. It is a simple React app. As far as I know CORS policy is determined by the browser and the server.
Glad you like ReactPress, please consider writing a review.
Cheers
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Identify current userwindow.reactPress
@ranierbonnici The local dev environment is only a create-react-app, that has its
index.html
updated with the content of the page/slug defined in ReactPress. How useful it is when accessing the remote machine, I cannot say.When the update doesn’t finish, it is a sign that the download of the slug times out.
I try to improve the documentation and error log, but unfortunately my time is scarce. I am always open to pull requests and sponsored development, though.