give you enough to feel comfortable starting on your own • Familiarity with modern JavaScript will be helpful • Please help your neighbors if you are able • Ask questions!
• Generally supports the entire JavaScript ecosystem • First-class support for web UIs • Use the DOM, CSS, etc., rather than native components • Fast iteration cycles • Often can run directly in a browser with no compilation • “Write once, run anywhere”
many mobile developers and it works well • Your app is almost entirely reliant on native components (focused on camera, maps, etc.) • You don’t want to learn or manage any native code at all
like regular React • Your tests aren’t representative of the real environment your code is running in. Oh, and you lose all the behavior • Test details of the state, the props of children, etc. • These are brittle implementation details
testID • Call the onClick prop for that component • Check that the state in the parent is updated The new approach: • Find the button with the text “Click me!” • Click the button • Check that the page contains the text “The button has been clicked”
native • Animations are exactly the ones native apps have • Stack & tab bar support • Fix elements on-screen across transitions • API: Every screen must be registered as a navigatable component
in JavaScript • Navigation primitives are native • Stack & tab bar support • Fairly large public API • API: Imperative creation of navigation components
roll most things on your own • Some features are impossible to implement without native code • Performance is even more of a liability with no native components
know about each other? • How does A know how to navigate to B? • How does A ensure B’s (network) dependencies are available? • How can you build B in such a way that both A and C can consume it?
• What do you do if A and B both need the same data? • How does B inform A that data has changed, or how does C inform both B and A? • How do you invalidate stale data?
system still works after changes? • How do you run 10000 unit tests efficiently? • How do you run 100 integration tests efficiently? • How do you avoid manually testing dozens of changes each week when the app is released?
by causing everything to know about everything and letting anything change anything. • Redux answers questions about how to share common things, but it doesn’t answer how to keep different things separate
“sub-applications” that can run (and be tested) independently of one another • Be explicit about data flows and mutations: always follow React’s “golden rule” (data flows down) • Expose the minimum public interface between sub applications
individual components within a larger component • Allows for extremely fine-grained control of animations, even to the point of describing the exact behavior per frame • Provides reasonable presets for easing, bouncing, etc.
components and animated values • Changes to animated values are animated on the native side • Values can be changed by tracking a gesture or firing a preconfigured series of changes • Values are interpolated into styling properties
After Effects animations • Used by many purely native applications • Great for single animated elements, like loading spinners or icons • Allows designers to design their animations
• Treats a native UI element just like any other React component • Great for small integrations that need to be native, like maps, partial screen camera views,
• Rather than rendering an entire React Native application, this strategy renders single components inside a native application. • Great for slowly integrating React Native into an existing native application
import modules from native code that expose arbitrary methods • Great for exposing native functionality, like geolocation, or opening the native share sheet