DEV Community

Yonz
Yonz

Posted on • Edited on

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.

Top comments (0)