I'm trying to develop an application by React Native with Native Base. And I'd like to implement filling in the blank questions like this.
So I tried to use Textinput component of React Native or Input component of Native Base in Text component of Native Base as below. But it doesn't work well on Android. (There is no input part in the rendered sentence.)
How can I use Textinput or Input inside Text?
<View>
<Text>
<TextInput width={40}></TextInput>
<Text>is a knowledge community in which we can ask programming questions and we can answer others’ programming questions.</Text>
</Text>
</View>
<View>
<Text>
<Input width={40}></Input>
<Text>is a knowledge community in which we can ask programming questions and we can answer others’ programming questions.</Text>
</Text>
</View>
This is rendered images. There is no input part.
And this is my package.json
.
{
"name": "AwesomeProject",
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-native-scripts": "1.9.0",
"jest-expo": "23.0.0",
"react-test-renderer": "16.0.0"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^23.0.4",
"react": "16.0.0",
"react-native": "0.50.3"
}
}