As one would expect - the end of the first week in a 100 days of React challenge is something that starts to involve a backend. I followed this tutorial by the awesome Yogesh Chavan, a master of React tutorials hidden behind the Medium.com paywall.
Project & Packages
The projects uses the nodemailer package to send emails, plus express to start the Node server, and react-bootstrap for some simple styling.
This was a great tutorial for where I am with these technologies because I have used all of them before in bits and pieces but don't have a lot of recent experience using React with a Node backend. Plus Nodemailer just makes sending emails with Node so easy.
Lastly, this little lesson was my first introduction to creating stateful functional components with the React useState hook. Classes are convenient but sometimes it feels like we are writing a bunch of extra syntax just to use state, so this was a very worthwhile introduction.
The Takeaway
I will probably come back to this project because there was so much new about it. Probably most of all it was cool to see my first app (in a long time) deployed with a Node server to Heroku- and just work.
FYI: For anyone thinking of doing this who hasn't deployed to Heroku in a while, follow this fantastic up-to-date tutorial on how you can deploy a React app with a backend on Heroku real fast: link.
See for yourself:
https://react-nodemailer.herokuapp.com/
github: https://github.com/jwhubert91/nodemailerReact
I just started a Twitter! It's neat. I of course follow by the ancient tenet follow-4-follow so follow me below:
www.twitter.com/jwhubert91
Top comments (3)
Hi James, I'm glad that my tutorial was helpful to you. You can find the link to my tutorial without a medium paywall at this URL.
You can find my other tutorials without a medium paywall at my GitHub profile page
Yogesh your tutorials are phenomenal!!! I was reading your discussion of React Hooks post today! Thanks for all of your writings.
Thank you so much James for such kind words. I'm really glad that you're finding my tutorials helpful. 🙏