Join Samer Buna for an in-depth discussion in this video Changing UI based on game status, part of React Native Essential Training.
- Let's simply make the target green or red…based on the games status.…So I can add another style here for the target…to set maybe the background color…to either green or red, based on the game steps.…So I'll make this into an array…so that we can add another style.…And in here I'm going to actually…use another function to compute the style…of this target panel based on the game status.…So let's do exactly that, let's call this…function target panel style.…
We can just pass the game status here…directly to this target panel style…so we don't compute it again.…I'm going to format this a little bit.…Now we can right target panel style.…So target panel style is a function…and this function is going to receive the game status here.…So this is the game status.…And based on the game status, it's going…to return a style sheet.…Well you know what, I think we can do this…with an easier way.…
Instead of introducing a new function here,…undo, undo, undo.…Okay so instead of all that function…logic we can simply add a dynamic style here.…
- 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.