Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend work doesn't work #6

Open
VigiliusOsloensis opened this issue Jul 8, 2022 · 2 comments
Open

frontend work doesn't work #6

VigiliusOsloensis opened this issue Jul 8, 2022 · 2 comments

Comments

@VigiliusOsloensis
Copy link

VigiliusOsloensis commented Jul 8, 2022

I tried this code for some time since saving the React code will remove all event handling (or javascript in general) if I use the default "npx @wordpress/create-block".

Looking at the frontend.js code it looks like it uses dom manipulation with ReactDOM to replace the pre-element with the base React component, this doesn't work at all in the frontend. Looking at the readme it also looks like you're using the default react localhost:3000 while wp-env uses localhost:8888, something I find confusing.

I'll have to look for some other solution. The Edit-component works just fine, but the ReactDOM just results in a white screen. It seems to replace the pre-element with json, but building the React-component fails.

@davulrich
Copy link

Maybe it could related to this issue #5 (comment)

@Irian-Adappty
Copy link

Maybe it could related to this issue #5 (comment)

This was my issue, after applying this fix it appeared on my website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants