I have been looking into updating my knowledge with a new technology (if that’s what you can call it). I have always been fascinated with React and Angular but I have never actually set myself the task of learning one and getting something built with it.
My end goal is to use ReactJS as a front end for WordPress, which I can use as a CMS. Using the REST API as a way to move data back and forth to a ReactJS front end. Hopefully by the end of this journey I should have a better understanding of ReactJS and be able to tie this into WordPress.
Where should I start?
To be honest, initially I had no idea, I didn’t even really know what I wanted to build, but I knew I wanted to build something with WordPress and ReactJS, so I decided to try and rebuild one of my local projects (an online adventure game). It works well at the moment, but it would definitely lend itself well to a more interactive and quicker front end than what it is currently using. My first step is to create a list of tutorials to read through and create some code!
- Learn React using this tutorial: https://reactjs.org/docs/rendering-elements.html
- Learn about the WordPress Rest API (and ACF inclusion): https://www.gavick.com/blog/adding-custom-fields-in-the-wordpress-rest-api
- Combining the two and creating a ReactJS front end to use the wordPress REST API: https://medium.freecodecamp.org/how-to-build-react-apps-on-top-of-the-wordpress-rest-api-bcc632808025
So that is my mini list of things to read and action, I’ve started with looking at the ReactJS tutorial and at the moment, it doesn’t make sense, which is awesome as it gives me something to learn and action. I am reading through Rendering an Element into the DOM, which looks cool!
const element = <h1>Hello, world</h1> ; ReactDOM.render(element, document.getElementById('root'));
What’s Next?
Next is to continue with the ReactJS tutorial and create some code samples, maybe on Github or just locally I haven’t decided yet. The next post will hopefully be sharing some code samples and what I have learnt from the tutorial. This may not be really informative to people who already know this stuff, but it’s just a quick post about how I go about learning something new and my experience in learning new things.
Hopefully someone will find this entertaining and enjoyable as I stumbled through my initial tutorials and become enlightened at the end, that’s gonna happen right?
Update: I will be working on this page during my ReactJS studies: https://epicwebs.co.uk/react. I am going to be building a monster finder for fifth edition D&D, because why not. Also make sure to checkout My Research: Learning ReactJS – Part Two.
Comments