W
W
wert wert2016-02-28 18:02:57
React
wert wert, 2016-02-28 18:02:57

How to wrap Native module with React Native?

Dear programmers, please explain to a novice programmer on a trial period what the task could mean: Wrap a Native module with React Native so that you can later use it in a script. Thanks for any comments on this issue.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita Gushchin, 2016-02-28
@iNikNik

Will depend on the platform. But in general - read the documentation, there are examples.
https://facebook.github.io/react-native/docs/nativ...
https://facebook.github.io/react-native/docs/nativ...
https://facebook.github.io/ react-native/docs/native...

W
wert wert, 2016-02-28
@kristim2016

Thank you. Read the documentation. So far it hasn't helped much. I'll ask the question more specifically, just with examples, it's always more clear. There is a module created using React Native, how to wrap this code using React Native, so that you can later use it in a script. Could you show. You need to make it for the android platform. Many thanks in advance, even if you scold! 'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View
} from 'react-native';
class ThreeProj extends Component {
render() {
return (
Welcome to React Native!
To get started, edit index.android.js
Shake or press menu button for dev menu
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center' ,
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('ThreeProj', () => ThreeProj);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question