I was just laughing out loud with the door open. I think the neighbors think I lost it there for a sec or just snapped.
I was interested in ways of using React in WordPress. I wanted to be able to develop Web3 apps with React on my blog. I started reading about it a month ago. And I just got something working today.
There are standard ways to use React in WordPress. You can code Elementor and Guthenberg blocks with React, and make WordPress Widgets with React. But can you run a complete React app on WordPress ?
ReactPress
And yes, you can run a complete React app on your WordPress website. With ReactPress, a WordPress plugin. It allows you to develop a React app on a local setup (a local wordpress site and a dev server) and upload the build directory to a live online production server.
And it actually runs. The server of this website is a normal shared hosting server, not a Node VPS. That was my main issue. I didn’t want to have to use a VPS with Node for a simple JavaScript app.
I uploaded the build directory, connected a page and it actually worked. What kind of Voodoo Magic is that ? Cool shit. Now I can code Web3 into my WordPress website. I laughed out loud at that moment.
I like this tool. It has a nice simple functional interface. I had some trouble getting it to work, it pays to read the documentation and author comments, and user feedback.
Once I got something running, I thought ‘fine… now, can I do Web3 with it in WordPress ?’. And yes, you can. As you can see on the new wallet page. It is a crude NFT whitelist app on the Goerli test-network. It is a code sample from the “Sophomore” course at LearnWeb3.io. You can log in with Metamask, and if you have the Goerli network installed and have some GoerliETH to spare, you can apply for the whitelist.
Famous last words : “it works on my machine”.