Im making a wordpress plugin that shows some stats about the website on the admin page and now im moving to the front end where i want to customize the page with stats by adding a map and putting the stats in little boxes so i choosed to use React for it, i installed an boilerplate for it (shown in the picture) and did the npm install and npm build commands that gave me the dist and node_modules folders, i searched and it seems i shouldnt put the node_modules on the FTP as its not needed, my question is what i need to do to setup it (did i need to do the build command/do i need the dist folder) also how do i link the react part to the PHP code? Sorry im new on React especially when it comes to using it on wordpress plugin environment. I tried the build command and asked chatgpt for code that i could use to link the PHP and React but my plugin page kept not being changed by the React or CSS code
I runned the build command on my react app and then used it on the FTP and put it on the root of the plugin (im not sure if theres where it should be) then asked chatgpt for some help on knowing how to link the PHP code with the react app and test it but it didnt work
Henrique Abreu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.