Today I was absorption on what I abstruse in the last few years, accurately accompanying to programming and computer science. It is fair to say that I explored many new things — IoT, computer vision, deep learning, blockchain development, and more on the programming side.

I was cerebration of making a series of posts about my adventure into all these technologies, and I wanted to start with my adventure and acquaintance alive with React. Why React? No accurate reason, but it’s the technology I’m alive with the most lately, and I think I have a good bulletin to pass along.

This post will not focus on coding but rather on the acquaint I abstruse after alive with React on many projects, from small claimed applications, to some big action and other customer-facing applications.

Never stop learning

This area won’t sound like a React specific lesson, but it’s essential. So hear me out!

Like almost annihilation in computer science, the only connected is change. As developers, it’s part of our job to stay up to date with the best practices for programming languages, frameworks, patterns, design, etc.

When I was starting with React, each basic was a class, and we didn’t have any of the “fancy” appearance such as hooks — and now I can’t think of a activity where I’m not using them.

The speed at which it changes forces us to be always account affidavit and blog posts to accept what’s new, why we should use it, and how. But you shouldn’t think of it as a burden. All these changes are advisedly alien in frameworks and programming languages to make our lives easier or bring a better acquaintance to the users; in all cases, it’s a win-win situation.

Minimalism is your best friend

React is all about components, and each of these apparatus will be amenable for your application’s behavior. But sometimes, the hard catechism is when to grow an absolute basic vs. when to create a new one.

After architecture many applications and refactoring those same applications, I can tell that what worked best was to create apparatus as basal as possible. The abate the components, the abate complication each of them introduces. And yes, I accept that it adds complication when interlinked, but accept me, the allowances are far exceeding.

I’ve advised apparatus with astronomic states, all because a lot was accident on those components. It was so hard to read as things were mixed after refactoring. We ended with assorted components, just a few lines of code each. It was like magic, so much easier to read, to debug.

Another advice on this same topic is to keep your side-effects and your business logic as abstracted from the UI as possible. I know it is sometimes appetizing to solve it in the component, but if you want to save yourself some time in the future, keep them split.

Don’t be afraid to refactor

I’ve read many times on the internet (probably Reddit) that you need to refactor because the code was abhorrent initially, and I couldn’t disagree more. I accept that refactoring is not only all-important but a normal thing to do. I see it as your appliance evolving to be future proof.

Sometimes, we refactor to make a specific function, component, or piece of code more clear and easier to understand. Just do it! In the long run, you will save yourself and your team a lot of time.

Why you got to the bearings where you need to refactor is hard to say, but here are some ideas:

  • Library updates that alien new patterns, concepts, ideas, or ways to solve problems.
  • Code that has been growing for a while in small increments, and with time complication grew and is now hard to maintain.
  • Deprecation of features

Embrace refactoring as a means to cleaner code, and don’t be too afraid about braking things; bethink that you have tests.

React has more than what you know

React is much more than the library itself; other libraries play nicely with React that you need to learn; there are patterns, best practices, etc.

One of React’s best things is its simplicity, but it has also avant-garde appearance that conceivably you wouldn’t use on every project. However, alive them will make you a better developer and help you boldness more circuitous and arduous tasks.

Explore some of the avant-garde appearance and patterns as part of your acquirements journey. Professionalize the library and get a deeper compassionate of how it works under the hood.

Some examples of things you can try out:

  • References and context
  • Higher-Order Components
  • Advanced JS patterns and functions
  • Memoization
  • and others

Conclusion

JavaScript and React, in particular, are unique technologies that can help you advance absurd applications. They are continuously evolving to amuse the user needs, as developers and companies prefer to build their products.

Staying up to date is essential, but it is not enough; acquaintance comes from acquirements new things and compassionate how they work.


This article was originally appear on Live Code Stream by Juan Cruz Martinez (twitter: @bajcmartinez), architect and administrator of Live Code Stream, entrepreneur, developer, author, speaker, and doer of things.

Read next: Can the law stop internet bots from undressing you?