DEV Community

loading...
Cover image for โ˜๏ธ One thing which has helped me IMMENSELY in learning React...

โ˜๏ธ One thing which has helped me IMMENSELY in learning React...

threehourcoffee profile image marie ng ใƒป2 min read

For context, I started my coding journey about a year ago: with html, css, javascript -> React ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป

One thing which has helped me, is working on a SINGLE project, and re-factoring that over time ๐Ÿ”

This is not to say BREADTH of experience is not important. It is. Do a variety of small projects and learn from many different people ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ

But...

...DEPTH of experience on a single project has helped me immensely! ๐Ÿ‘

This was my progression for learning:

  1. Find a project you like on CodePen (or similar site). When I started learning vanilla javascript, I found a basic to-do list on CodePen, copied over its html/CSS but deleted all its javascript. Then practiced re-writing my own. This way you're not trying to do too many things at once, but are honing in on one area...in this case javascript.

  2. Improve upon the design. After I had re-written the javascript, I practiced re-designing the to-do list with my own CSS. Again, deleting what was there and starting that part from scratch and to my own liking.

  3. Next I wanted to learn React. So I re-factored the whole application using React class-based components.

  4. Then re-factored the whole application again using functional components and React hooks.

  5. Lastly, I wanted to learn Styled Components, so I re-wrote all my CSS classes using a Styled Components approach.

This has been incredibly helpful to me, as it allowed me to see how the same functionality could be implemented with different approaches.

And it really made me appreciate the relationship between vanilla javascript and React as a framework.

Using this approach, I started off with a very basic to-do app:

https://twitter.com/threehourcoffee/status/1225241414667161600

And turned it into the project I work on now:

https://llamalife.co/

(it is a to-do list that lets you add a timer to each and every task)

Hope this is helpful! Any questions, feel free to ask in the comments.

Image source: @visualashish

Discussion (0)

pic
Editor guide