Set up your React Native environment
The Bit development environment provides your components with the dev tooling and configuration required to run, build and test your components.
You can create a custom React Native dev environment that extends Bit's base React Native, to better control your configuration and tools.
my-react-native-env-env
new
Create a React Native env
Generate your first React Native env component. containing a custom env with the following command. If you already have a workspace you can skip this step.
$bit new react-native my-workspace --env teambit.react/react-native-env --default-scope my-org.my-scope
In an existing workspace use the following command to create a custom React Native:
$bit create react-native-env envs/my-react-native-env --aspect teambit.react/react-native-env
Add your env generators
The new custom env contains templates for new components, inherited from Bit's base react env. Add them to your workspace by adding this snippet to workspace.jsonc
(replace with your env's full component name).
{ "teambit.generator/generator": { "envs": ["my-org.my-scope/my-custom-env"] } }