React Native permits the reusability of code. After the fruitful advancement of one portable application, developers can reuse that code to build up an application on other mobile stages. In this way, utilizing React Native you can create cost-viably shrewd cross-platform applications.
React Native is one of the most in-demand open-source structures that permit developers to compose a single code with JavaScript, including segments for the two iOS and Android, it prompts smaller groups, ease and simple undertaking the board. In this way, the cross-platform applications created utilizing React Native are on a par with native applications.
There are different issues that can be faced by a developer while the application is under the building and React Native application’s improvement.
In any case, there are a few common mistakes that are most widely recognized, ones that you should stay away from no matter what. Keep in mind, application advancement is an unpredictable and specialized procedure.
Errors will be made while you are in the phase. All you have to focus on is committing as not many errors as could reasonably be expected. These are the common mistakes-
1. Wrong estimation
2. Wrong redux store planning
3. Not reading external modules’ codes
4. Mutation of state inside render function
5. Left “console.log” statements
6. Using stateless component for gaining React Native performance
7. Not optimizing React Native images
8. Not conducting unit testing
9. Erroneous & Wrong project structure
10. Keeping the logic and design in the same file

1. Wrong estimation of the Project
One thing numerous react native developers overlook is that the format of the Android and iOS adaptation is very different from one another. Indeed, React Native allows you to utilize different segments reciprocally for the two platforms.
It has been seen that certain components are not usable. For example, the structure of the application page of the two platforms is different on the two platforms.
Furthermore, during the underlying long stretches of programming your application through React Native, it is anything but difficult to undermine the number of codes one would compose.
This emerges in light of the fact that, when one creates a hybrid application on platforms like Cordova, you are required to compose fewer codes. This incorrect estimation, while making a React Native application, can wind up making a ton of issues for the coder.
2. Wrong redux store planning
Redux is a convenient apparatus that aids in the viable administration of an application. It likewise permits you to store information assembled by the application appropriately. For the most part, Redux is utilized for overseeing bigger and heavier applications.
React Native makes utilization of Redux. Be that as it may, you should design it appropriately to keep away from issues. Additionally utilizing Redux can likewise expand the measure of the outstanding tasks at hand. While this may appear to be reasonable for large applications and undertakings, it isn’t appropriate for smaller projects.
This is on the grounds that Redux expects you to compose long, complex codes for the tiniest of changes. In this way, in the event that you are making a React Native App for a small scale application, it is best not to use Redux. It will produce plenty of issues and inconveniences for you.
Redux aides in putting away the information effectively and overseeing, investigating application states. At the point when arranged right, it tends to be an incredible asset for dealing with the application information. When not, it can destroy numerous things.
3. Not reading external modules’ codes
Application development is without a doubt a tedious and convoluted procedure. Justifiably, many wish to lessen their problems as much could be expected. One basic way developers accomplish this is by utilizing external modules during the application improvement process.
Since external modules will, in general, accompany documentation and already have totally framed codes, it builds the pace of the application advancement process.
Be that as it may, one slip-up developers make when utilizing external modules isn’t reading all the codes that it comprises of.
A lot of times, when you add an external module to your codes, it may break or not play out the capacity you implied for it to perform. This can wind up expanding your remaining burden instead of lessening it.
This is the reason it is profoundly prompted that engineers read every single code. This will permit them to distinguish any mistakes that are available inside the code and consequently settle in before applying it to their application.
4. Mutation of state inside render function
The datastore contains every one of your information in the segment and the view is rendered based on the state. It at that point devours another state from the information store and shows it on the screen.
So as to accomplish that, React has a setState() work where the new article state is taken and contrasted with the past state. At last, another state is included after the merger with the past state and sent to the state datastore. This cycle is accessible all through the lifetime of a part when you build up an application to React Native.
Presently, in the event that you change the state straightforwardly, the lifecycle fails and it undermines all the past states. This prompts an application carrying on strangely or even an accident. This will likewise bring about you forgetting about the states across the segment and will prompt you composing custom code instead of React. Furthermore, you’ll wind up having an unmanageable code and a heavy application.
5. Leaving “console.log” statements
When building up a React Native application, a developer may utilize console log statements. This aide in troubleshooting the application and guaranteeing that it stands glitch-free during the application executive stage. Be that as it may, you should evacuate the log articulation before continuing.
Frequently, developers neglect to evacuate the support log articulations. This can prompt a serious issue. This particularly happens when your application contains both render techniques just as rationales.
Assuming this is the case, the comfort log proclamation can wind up turning into a bottleneck for the JavaScript string. Thus, it prompts a slacking and moderate performing application.
6. Using stateless component for gaining React Native performance
The stateless component fundamentally implies that the component doesn’t expand any class. It essentially accepts the contention as display and props in the DOM. It accompanies benefits like Simple testing capacity, Quick execution and Doesn’t utilize state or the nearby factors.
With the time ever-growing, it has today gotten smarter for developers to utilize unadulterated components when they make React Native applications. Here’s the reason –
Performs shallow analysis – This is an uncommon success for complex UI applications as it brings down the render activities. The purpose for it is that it accompanies a real existence cycle technique known as shouldComponentUpdate which consequently does a shallow correlation and afterwards check if re-render is required. On account of stateless components, re-render happens when parent component re-renders. Be that as it may, on account of unadulterated components, re-render possibly happens when a change is distinguished in the states or props.
Performs side effects – Developers could also send in AJAX requests inside module Didmount or can execute some other DOM operations.
7. Not optimizing React Native images
While numerous developers may not consider enhancing the React Native pictures to be a basic advance of the application improvement process, the truth of the matter is that it is a high-need task that ought not to be overlooked.
Advancing React Native pictures helps in locally resizing all pictures utilized inside the application. It at that point naturally transfers them all to distributed storage through the server. Developers are then given a CDN connection that they can use through their API.
This whole procedure of advancement helps in decreasing the picture load time of the application. What’s more, leaving pictures unoptimized can wind up expanding load time to such a degree, that clients become careful about your application.
8. Not conducting unit testing
Not composing a testing unit is by a long shot the most well-known and least demanding slip-up to make while making a React Native App. This is on the grounds that the created application can at present work whether or not you compose testing units or not. However, it is where you just discover the outcome once you put your application out for the world to download and pass judgment.
As opposed to leaving your application’s destiny helpless before clients, it is smarter to test its usefulness and guarantee its flawlessness before you dispatch it in the market. This is the place a unit test proves to be useful.
A unit test permits you to evaluate the different parts and highlights of your applications freely. This will empower you to ensure that each capacity fills in true to form. By composing a unit test during the improvement phase of your application, you can know about the bugs in your application. This implies you don’t need to sit around following the wellspring of glitch later on.
9. Erroneous & Wrong project structure
To work and deal with an inappropriate project structure is troublesome. Organizing a project should be possible from multiple points of view. Presently developers can make their life simple by arranging tasks, documents, and organizers.
By and large, newcomers don’t focus on arranging and organizing, and this later makes loads of issues. It is critical to have a decent undertaking structure. So while building up a respond local application, it is critical to execute the best undertaking structure.
A good project structure is very important to the developer, so the developer should implement the most appropriate structure for the React Native App.
10. Keeping the logic and design in the same file
React Native developers face this issue wherein, they keep all records identifying with any one part in an organizer, including styling/designing files.
There can be a few smaller components utilized by a particular component only, it makes complete sense to keep all these smaller components all together inside that component folder. Sometimes the approach of keeping all the files in a single folder leads to mess and cluster which makes it difficult for the developer to sort when the application is huge and complex. Well, you can easily extract code to any other project or even modify the code whenever you want but with the ease comes complexity too.