ReactNative Best Practices & Libs 2020

Most of the things you should to know about React-Native in 2020

Best Practices

For example, say you have the following files in your project:

You can then require the component as follows:

It will make your logic more predictable and straightforward that will help you not to die in cross-calls hell.

Functional components is not faster.

If your React component’s render() function renders the same result given the same props and state, you can use React.PureComponent for a performance boost in some cases.

Always use fixed dependencies:

and don’t do like this:

And don’t forget about Android and iOS dependencies.

This will save you hair on your head.

Many of you saw things like that:

You can fix this by adding package.json to the ComponentFolder with content:

Now you can import your components from everywhere like that:

Much better, yeah?



Remx is simpler with code reuse, Redux uses more boilerplate code and linked to many libraries.

There are two best ways:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store