Relative Content

Tag Archive for phpreactjswordpressreact-nativewordpress-plugin-creation

WordPress plugin React Integration

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