Reputation: 1710
Some help would be appreciated with the following issue:
I'm trying to get the non-minified output. For some reason, I keep getting Error: Minified React error
even when I run the app in development mode.
I can open the development tools and with the code below I can see Development is printed in the console.
if (__DEV__) {
console.log('Development');
} else {
console.log('Production');
}
I started the project with npx react-native init AwesomeProject
and made an error.
How can i set up the non-minified dev environment.
When I used a template project with expo and did an eject to react native it was using the the non-minified dev environment. Can someone explain how i can set this up on the creation of a new project with npx?
Upvotes: 0
Views: 94
Reputation: 1710
Having an incorrect import was causing this issue.
I let IntelliJ import useState
without verifying it.
Changing the import from:
import {useState} from 'react/cjs/react.production.min';
To
import {useState} from 'react';
fixes the issues.
Upvotes: 1