Files: 6f207214603cecdfaceac26619937078ba1e2a1b / nodejs-assets / nodejs-project / sample-main.js
398 bytesRaw
1 | // Rename this sample file to main.js to use on your project. |
2 | // The main.js file will be overwritten in updates/reinstalls. |
3 | |
4 | var rn_bridge = require('rn-bridge'); |
5 | |
6 | // Echo every message received from react-native. |
7 | rn_bridge.channel.on('message', (msg) => { |
8 | rn_bridge.channel.send(msg); |
9 | } ); |
10 | |
11 | // Inform react-native node is initialized. |
12 | rn_bridge.channel.send("Node was initialized."); |
Built with git-ssb-web