Hello guys im trying to find a react-native code which is equivalent to the html code below:
<a href="#Ducks">Ducks Section</a>
<br>
<br>
<br>
<p name="Ducks">this is about ducks</p>
Hello guys im trying to find a react-native code which is equivalent to the html code below:
<a href="#Ducks">Ducks Section</a>
<br>
<br>
<br>
<p name="Ducks">this is about ducks</p>
Consider wrapping a Text component in a TouchableOpacity.
class App extends Component {
render() {
return (
<View>
<TouchableOpacity>
<Text style={{color: 'blue'}} onPress={() => {}}>
Ducks Section
</Text>
</TouchableOpacity>
<TouchableOpacity style={{marginTop:50}}> <!-- According to you requirement-->
<Text style={{color: 'blue'}} onPress={() => {}}>
this is about ducks
</Text>
</TouchableOpacity>
<View>
);
}
}
You can use a react-native-hyperlink component for react-native-web that makes urls, fuzzy links, emails etc clickable. More discussion found here