rockiger
Forum Replies Created
-
@mouad09 Do you have access to your database? Can you delete the
option_name
“repr_apps” from thewp_options
table? And then reload the ReactPress admin page?You will need to add a higher specificity to your React app’s CSS. If you’re using SCSS it could be something like this:
#root { /* the id of the React app's root element /* ... add your styles here */ }
This also works in plain CSS with newer browsers.
There are, of course, other methods to achieve this.
The orphans shouldn’t be there. Only the two last project should be shown in the admin area.
Ignore the other ones. Can you add pages for the last two apps?Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Unable to ActivateTHis is a problem with your PHP configuration. You need to allow arrow functions.
Do yourself a favor and use LocalWP instead of a local lampp installation.
@techiethemastermind It looks like you are using a Windows system. This is your dev system, I assume. I can’t test Windows systems, so support is only experimental.
I can’t tell you why you can’t download the page. But this shouldn’t have anything to do with the integration into the page.
My suggestion would be to try LocalWP as the dev server. Preferably on WSL-2. Or revert to a working version of ReactPress (No, security changes were applied).
I don’t have a better solution. Sorry.
My best bet would be writing a custom plugin and api endpoint for WordPress. I don’t see a simple solution. Sorry.
Hello @artur1323,
I don’t understand what you mean. Can you be more specific? Why did you create a React app if you had a WordPress solution?
Generally speaking, your React app is a single page, hence the name Single Page Application.
As I said, I don’t really understand your use case.Using BrowserRouter is possible. You can activate it in the advanced section of your app. But support is sketchy, because then WordPress’s routing needs to work in sync with React’s routing, which is not always possible. Using BrowserRouter is hit or miss.
With HashRouter you are on the save side. Your React app is a standard React app. Only the base URL is changed from
/
to the location of where the app embedded.Did you use the Getting-Started-Guide on https://rockiger.com/en/reactpress/getting-started/. I totally forgot to update the content there. I updated the Getting Started Guide.
For a more detailed explanation you can try the full React with WordPress Tutorial. It doesn’t have any pictures from the admin area, but its focus is moren on the development process.
Hi @afshinmoshrefi,
glad you are using ReactPress this long. Did you already review it?
Back to your question. Assuming you mean the name of the page where your app is embedded: You need to go to this page in your WordPress Admin and change the page title there.
I hope this helps.Cheers
Hi @ddboy19912,
to use the canvas, go to the page where added your ReactPress app in the WordPress. You can change the template of that page in the admin to ReactPress canvas.
Best
If you use Vite there is no
PUBLIC_URL
. It was provided by CRA.
For static asset in Vite see: https://vitejs.dev/guide/assets.html
For envirenment variables in Vite see: https://vitejs.dev/guide/env-and-mode.html.Hope this helps.
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Only Routing to Error PageDo yourself a favor and use hashrouter.
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] Only Routing to Error PageFirst, I recommend
hashRouter
instead ofbrowserRouter
. So you should probably usecreateHashRouter
.Secondly, what does the browser console say?
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] loading .fbxThe build path is set in
package.json
. Maybe you need to adjust for that in production. Have a look inpackage.json
.