Skip to content

Commit b7c5e78

Browse files
committed
small fix for configuration
1 parent 54704e9 commit b7c5e78

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docs/overview/migrating-react-native.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ Proper handle of dependencies:
4343
For example:
4444
```
4545
"plugins": {
46-
"react-native": {
47-
"source": "rnv"
48-
}
46+
"react-native": "source:rnv"
4947
}
5048
```
5149
- As in the above example all the necessary linking will be handled by ReNative, however some dependencies do not have existing mappings in ReNative (can be checked [here](https://github.com/flexn-io/commonwealth/blob/main/packages/plugins/pluginTemplates/renative.plugins.json)), you will need to implement them manually. For more information, please visit this <a href="/docs/concepts/plugins#custom-plugin-support">link</a>.
@@ -60,13 +58,18 @@ When transferring your project, it's essential not to overlook updating your con
6058
6159
Ensuring these files are correctly configured will help avoid issues and ensure smooth operation of your project.
6260
63-
You can utilize ReNative's configuration methods to add your custom configurations. For example:
64-
```
65-
module.exports = withRNVRNConfig({
61+
You can utilize ReNative's configuration methods to add your custom configurations. Here is example for `react-native.config.js`:
62+
```js title="react-native.config.js"
63+
const { withRNVRNConfig } = require('@rnv/adapter');
64+
65+
const config = withRNVRNConfig({
6666
//custom configurations
6767
...
6868
});
69+
70+
module.exports = config;
6971
```
72+
7073
By incorporating custom configurations in this manner, the basic ReNative configurations and your custom settings are merged and applied together when the app is run.
7174

7275
## Common Errors

0 commit comments

Comments
 (0)