2

I'm trying to embed an existing react app to my WordPress site using the plugin ReactPress. I created a react app inside the plugin section:

enter image description here

and added my build folder of the existing react app inside the path where is needed (using file administrator plugin):

enter image description here

The Path is wp-content/plugins/reactpress/apps/dase-mural-design. The problem is when I click on the URL Slug in order to see this section (where the build folder is placed) I don't see the react app I've just uploaded, I just see header and footer and these errors:

enter image description here

What I'm doing wrong? How can I fix it?

Thanks in advance.

Update: I used FileZilla to upload these files but is still not showing anything. Any idea?

enter image description here

I changed the package.json homepage to: "homepage": "/wp-content/plugins/reactpress/apps/dase-mural-design/build",

But in the console of the WordPress site I see: enter image description here Thanks

2 Answers 2

1
+50

It's an encoding issue, try setting your site encoding to utf-8 or uploading the files of your react app with a different tool, it could be the file manager plugin is changing the encoding when uploading.

Sign up to request clarification or add additional context in comments.

6 Comments

how can I change my site encoding to utf-8? @diedu
Find this line on wp-config.php define( 'DB_CHARSET', 'utf8' ); & change as per your needs
I used filezilla to upload the build files but is still not working. Any idea? @ShaikhAejazAhmed
Did you changed site encoding as @diedu said ? You marked the answer so i thought issue is resolved
I did not change the encoding, I just uploaded the files using FileZilla. The issue is not resolved because the page is still not appearing. I updated the question. Do you have any idea about what is happening?
|
0

I had a similar issue but I was able to have the React application display by adding an HTML block containing a div with the ID "root".

<div id="root"></div>

See this other post: embeddable widget using React.js uncaught error minified react error #299

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.