Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
React and React Native

You're reading from   React and React Native Build cross-platform JavaScript apps with native power for mobile, web and desktop

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781786465658
Length 500 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Adam Boduch Adam Boduch
Author Profile Icon Adam Boduch
Adam Boduch
Arrow right icon
View More author details
Toc

Table of Contents (27) Chapters Close

Preface 1. Why React? FREE CHAPTER 2. Rendering with JSX 3. Understanding Properties and State 4. Event Handling – The React Way 5. Crafting Reusable Components 6. The React Component Lifecycle 7. Validating Component Properties 8. Extending Components 9. Handling Navigation with Routes 10. Server-Side React Components 11. Mobile-First React Components 12. Why React Native? 13. Kickstarting React Native Projects 14. Building Responsive Layouts with Flexbox 15. Navigating Between Screens 16. Rendering Item Lists 17. Showing Progress 18. Geolocation and Maps 19. Collecting User Input 20. Alerts, Notifications, and Confirmation 21. Responding to User Gestures 22. Controlling Image Display 23. Going Offline 24. Handling Application State 25. Why Relay and GraphQL? 26. Building a Relay React App

TodoMVC and Relay

I had originally planned to extend the Neckbeard News app that we worked on earlier, in this chapter. Instead, I decided that the TodoMVC example for Relay (https://github.com/relayjs/relay-examples) is a robust yet concise example that I would have trouble beating.

So, the plan is this: I'm going to walk you through an example React Native implementation of a Todo app. The key is that it'll use the same GraphQL backend as the web UI. I think this is an absolute win for React developers that want to build both web and native versions of their apps; they can literally share the same schema!

I've included the web version of the TodoMVC app in the code that ships with this book, but I won't dwell on the details of how it works. If you've worked on web development in the past 5 years, you've probably come across a sample Todo app. Here's what the web version looks like:

TodoMVC and Relay

The functionality is pretty self explanatory, so even if you haven&apos...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime