You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move ReactComponent out of Pods directory in EmbeddableApp
It doesn’t seem like a good practice to tell people to create their custom
ReactComponent directory inside of the Pods/ directory. The Pods/ directory
should be limited to CocoaPods installed content, and it’s not even
accepted across the board to [check this stuff into git][1]
Therefore, let’s tune the EmbeddableApp tutorial to instruct users to
create a ReactComponent directory at the root of their project. From there,
we’ll start the development server packager to source that directory as
a JS files root. This change also improves starting this packager server,
proxying the command through npm.
[1]: https://github.com/github/gitignore/blob/5883804e6ceb0867e88dc8ca1c7585fa61e40797/Objective-C.gitignore#L20-L26
(JS_DIR=`pwd`/ReactComponent; cd Pods/React; npm run start -- --root $JS_DIR)
138
137
```
139
138
140
-
`--root` indicates the root of your React Native apps. Here we just have one **index.ios.js**. React Native development server will use packager to create a **index.ios.bundle**. Which can be access via `http://localhost:8081/index.ios.bundle`.
139
+
This command will start up a React Native development server within our CocoaPods dependency to build our bundled script. The `--root`option indicates the root of your React Native apps – this will be our `ReactComponents` directory containing the single `index.ios.js` file. This running server will package up the `index.ios.bundle` file accessible via `http://localhost:8081/index.ios.bundle`.
0 commit comments