Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

react native text onpress navigate to a part of your page

$
0
0

I want to navigate to a different place of my page when I click on a text. Does anyone know how to do this? (I want to keep being on the same page)For exemple if I click on white I want to go to the place where I speak about the color white on my page.Here is my code if you want:

          return (<View><Text                      style={{                        fontSize: 20,                        fontWeight: "600",                        marginLeft: 15,                        marginRight: 15,                      }}                       //onPress={}>                      {letter.name}</Text></View>                );

And here is the part where I want to go :

       return (<View                  style={{                    flex: 1,                    backgroundColor: "blue",                    flexDirection: "row",                    marginLeft: 135,                  }}><Text                    style={{                      fontSize: 90,                      fontWeight: "200",                      marginLeft: 15,                      marginRight: 15,                      marginBottom: 100,                    }}>                    {letter.name}</Text></View>               );

Viewing all articles
Browse latest Browse all 6287

Trending Articles