Create a module inline

(Yarrichar) #1


I’m new to react-native and trying to get my head around module / components etc.

If I’m understanding the tutorials correctly I create a module by doing:
$ npm install -g react-native-create-library
$ react-native-create-library MyLibrary

This creates a new library in it’s own directory structure.

Is there any way to define a module in the main directory structure? I.e. what gets created after:
react-native init AwesomeProject

Any modules will be for internal use, so I would rather keep stuff self contained.

If it’s not possible can you have multiple modules defined in the one library?