How the switch was in the beginning
First book I read
I was able to make it through 7 or 8 chapters of this book before the exercises seemed a little over my head in terms of complexity. No worries there, I can always return to it later on when my fundamentals are stronger.
I would recommend this course for anyone that is about where I was when I took it. I think it really helped bridge the gap from fundamentals and basics to real-world use-cases.
Picking up a modern frontend framework
The next logical step for me was to look into ReactJS. To be totally honest, I chose to start with React because of the job market. There were a lot more open roles that listed React than either Angular or Vue.
I also knew that React had been on the scene for long enough that I knew it wasn’t going away any time soon. One more consideration that I took into account was the trend of React, it was moving most steadily up, closely followed by Vue.
The place that I started when looking into React was the React official tutorial itself, you can find it here. I found that the basic tutorial on the React website, however limited it was, gave a good basic overview of some of the core concepts of React.
The tutorial covered passing data from one component to another through props. It also covered making components interactive with the use of event listeners. The tutorial also covered component state, which is a vital part of React, especially when starting out.
After the first tutorial
After completing the React official tutorial, I decided it would be best to try and recreate a simple website using React, so I created a very simple portfolio website with React. I bootstrapped it with Create React App, and it was super simple. The website didn’t have any interactivity, besides some carousels, and it certainly didn’t pull any data from another source.
However limited the scope of that first React project, I felt it really helped me as I set out to create something without the use of any tutorial or guide, and finished it to completion. I ended up hosting this project on Heroku.
Integrating backend and frontend
The nice thing about using a prebuilt solution is that it creates your API for you when you create a content type. It will automatically create CRUD endpoints for every single content type your create, and allows you to override existing endpoints if you wanted to query a post by slug rather than id, or if you wanted to extend the functionality of your API.
Once you have a source of data that you can pull from, there are a bunch of ways to fetch that data in React. My favorite, tried and true method for sending HTTP requests has been Axios. I have even utilized Axios to interface with 15 year old SOAP endpoints at my current job.
So how does this relate to Wordpress?
The developer experience using React is much nicer in my opinion than Wordpress. I know Wordpress is shifting towards a more modern form of development, which can be helped even more so by using a skeleton framework like Roots Sage, which introduces a modern MVC approach to developing themes for Wordpress. There are also several SaaS applications, like SpinupWP, that help out with the entire Wordpress ecosystem, and will definitely be something that I turn to if I need to ever develop on the Wordpress platform again.
My personal verdict
If I could do everything over again, I would have made the switch much sooner. The doors that switching has opened up for me are incredible, and my ability to go from idea to product has never been stronger.