DEV Community

Yonz
Yonz

Posted on • Edited on

1

The React Way

The world of react can be amazing and completely bizarre sometimes. After spending a year on react-native, the following issues continue to plague me. I plan to post follow up parts that answer each of the following issues.

  1. Breaking react hooks rule What is the best way to share functionality across different components? For example, a data filter functionality?
  2. Performant Sort Flatlist sorting is done by changing the data object to one that is sorted. That requirement combined with immutability means that a new array needs to be created and set.
  3. Persisting Data Lack of binary support and lack of a proper background global loader turns persisting and loading data into a landmine.
  4. 16.67 ms for everything How to make sure your long running work doesn't freeze your UI. Found solutions like InteractionManager.runAfterInteractions, tried throwing await everywhere and making async handlers.
  5. Node vs React Shims How to properly handle crypto getRandomBytes, etc. Especially in react-native
  6. Chained logic Conditional rendering, conditional routing and other stage gating techniques

TLDR; The flexibility of react is a sword with two edges where you cut development time on one side but can also cut yourself by not following norms (which are hard to find btw).

Feel free to comment if you have write ups for the above or just want to pile on.

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay