You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: