Or… How I learned to love React FlowBox.
This one should have been easy — or so I thought. I had a block of text, and I needed to highlight text in that block. I figured I’d whip something together, and be done in a few minutes. Then, I started WAY overthinking things.
Let’s walk through all the things I did wrong. :)
First — here’s my stated output:
Actually, ‘var1’ is a clickable pressable box.
The text came from this:
“text”: “Carefully, ‘{var var1}’ you say to the Grue! “
This is a JSON file containing the data I’m reading in. It could just as easily be a REST service or other item.
I’ve defined a pseudo-grammar to allow me to specify variables and other actions in the text, which allow me to control the program flow, none of which is the point of this article.
What I want to do is to highlight the var1 in that sentence, ensuring that it stands out to the user.
This sentence, if it was not dynamic, could be composed of the following:
<Text> Hello
<Pressable
onPress={() => {
console.log('foo!');
}}>
<Text>
Hello <Text style={{color: 'red'}}> you again </Text>
</Text>
</Pressable>
</Text>
And that would have been all well and good.
Article covers: How native is react native?, React Native vs (Ionic, Cordova), Similarities and difference between React Native and Native App Development.
Have you ever thought of having your own app that runs smoothly over multiple platforms? React Native is an open-source cross-platform mobile application framework which is a great option to create mobile apps for both Android and iOS. **[Hire...
Skenix is providing React Native Development Services with qualified React Native App Developers. Get the best React Native App Development Services.
React Native Redux Example Tutorial From Scratch. We connect the React Native app to Redux store to save and retrieve the application data.
As we start learning new technologies we want to start building something or work on a simple project to get a better understanding of the technology.