Join Samer Buna for an in-depth discussion in this video Changing UI based on selected numbers, part of React Native Essential Training.
- [Instructor] Now that we know that we have a way…to handle the press of a number,…let's think about the logic behind this press.…Every time we press a number,…we would like to keep a running sum…and once this running sum is equal or greater…than 28, we have two cases to handle,…but before we actually handle that logic.…Let's handle the UI logic.…So every time I press a number,…what should the UI do?…And for this particular game, the UI should show…that this number is pressed…because I can't actually press it again.…
Once I press it once, the UI should change…the state of that number and I can't press it again.…Since the UI has to change, that means every time…I press the number, something has to change on the state…somewhere because I need React to re-render the view.…So your next question becomes…what should we place on the state…and where should we place that on the state?…For example, can I place the value of the number…on the state?…Can I place this six here on the state?…While it might work for this case,…
- Hello React Native on iOS and Android
- Styling React Native components
- Platform APIs
- Building a simple game app and a data-driven app
- Using the Fetch API
- Creating an animation loop
- Testing on Android
- Changing an app logo and a splash screen
- Using TestFlight with internal testers
Skill Level Intermediate
1. Getting Started
2. React Native Fundamentals
Hello React Native on iOS5m 42s
3. Building a Simple Game App
4. Building a Data-driven App
5. Animation and Gesture Control
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.