Table of Contents for
React Quickly: Painless web apps with React, JSX, Redux, and GraphQL

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition React Quickly: Painless web apps with React, JSX, Redux, and GraphQL by Azat Mardan Published by Manning Publications, 2017
  1. Cover
  2. React Quickly: Painless web apps with React, JSX, Redux, and GraphQL
  3. Copyright
  4. React Quickly: Painless web apps with React, JSX, Redux, and GraphQL
  5. Brief Table of Contents
  6. Table of Contents
  7. Praise for React Quickly
  8. Foreword
  9. Preface
  10. Acknowledgments
  11. About This Book
  12. About the Author
  13. About the Cover
  14. Part 1. React foundation
  15. Chapter 1. Meeting React
  16. Chapter 2. Baby steps with React
  17. Chapter 3. Introduction to JSX
  18. Chapter 4. Making React interactive with states
  19. Chapter 5. React component lifecycle events
  20. Chapter 6. Handling events in React
  21. Chapter 7. Working with forms in React
  22. Chapter 8. Scaling React components
  23. Chapter 9. Project: Menu component
  24. Chapter 10. Project: Tooltip component
  25. Chapter 11. Project: Timer component
  26. Part 2. React architecture
  27. Chapter 12. The Webpack build tool
  28. Chapter 13. React routing
  29. Chapter 14. Working with data using Redux
  30. Chapter 15. Working with data using GraphQL
  31. Chapter 16. Unit testing React with Jest
  32. Chapter 17. React on Node and Universal JavaScript
  33. Chapter 18. Project: Building a bookstore with React Router
  34. Chapter 19. Project: Checking passwords with Jest
  35. Chapter 20. Project: Implementing autocomplete with Jest, Express, and MongoDB
  36. Appendix A. Installing applications used in this book
  37. Appendix B. React cheatsheet
  38. Appendix C. Express.js cheatsheet
  39. Appendix D. MongoDB and Mongoose cheatsheet
  40. Appendix E. ES6 for success
  41. React Cheatsheet
  42. Index
  43. List of Figures
  44. List of Tables
  45. List of Listings

Preface

It was 2008, and banks were closing left and right. I was working at the Federal Deposit Insurance Corporation (FDIC), whose primary task is to pay back depositors of closed, failed, and insolvent banks. I admit that, in terms of job security, my job was on par with working at Lehman Brothers or being a ticket salesman for the Titanic. But when my department’s eventual budget cuts were still far in the future, I had the chance to work on an app called Electronic Deposit Insurance Estimator (EDIE). The app became hugely popular for a simple reason: people were anxious to find out how much of their savings was insured by the United States federal government, and EDIE estimated that amount.

But there was a catch: people don’t like to tell the government about their private accounts. To protect their privacy, the app was made entirely in front-end JavaScript, HTML, and CSS, without any back-end technologies. This way, the FDIC wasn’t collecting any financial information.

The app was a hot mess of spaghetti code left by dozens of iterations of consultants. Developers came and went, leaving no documentation and nothing resembling any logical, simple algorithms. It was like trying to use the New York City subway without a map. There were myriads of functions to call other functions, strange data structures, and more functions. In modern terminology, the app was pure user interface (UI), because it had no backend.

I wish I’d had React.js back then. React brings joy. It’s a new way of thinking—a new way of developing. The simplicity of having your core functionality in one place, as opposed to splitting it into HTML and JS, is liberating. It reignited my passion for front-end development.

React is a fresh way of looking at developing UI components. It’s a new generation of presentation layer libraries. Together with a model and routing library, React can replace Angular, Backbone, or Ember in the web and mobile tech stack. This is the reason I wrote this book. I never liked Angular: it’s too complex and opinionated. The template engine is very domain specific, to the point that it’s not JavaScript anymore; it’s another language. I have used Backbone.js and like it for its simplicity and DIY approach. Backbone.js is mature and more like a foundation for your own framework than a full-blown, opinionated framework in itself. The problem with Backbone is the increased complexity of interactions between models and views: multiple views update various models, which update other views, which trigger events on models.

My personal experience from doing a Kickstarter campaign for my React.js online course (http://mng.bz/XgkO) and from going to various conferences and events has shown me that developers are hungry for a better way to develop UIs. Most business value now lies in UIs. The backend is a commodity. In the Bay Area, where I live and work, most job openings in software engineering are for front-end or (a trendy new title) generalist/fullstack developers. Only a few big companies like Google, Amazon, and Capital One still have relatively strong demand for data scientists and back-end engineers.

The best way to ensure job security or get a great job in the first place is to become a generalist. The fastest way to do so is to use an isomorphic, scalable, developer-friendly library like React on the front end, paired with Node.js on the backend in case you ever need to mess with server-side code.

For mobile developers, HTML5 was a dirty word two or three years ago. Facebook dropped its HTML5 app in favor of a more performant native implementation. But this unfavorable view is quickly changing. With React Native, you can render for mobile apps: you can keep your UI components but tailor them to different environments, another point in favor of learning React.

Programming can be creative. Don’t get bogged down by mundane tasks, complexity, and fake separation of concerns. Cut out all the unnecessary junk, and unleash your creative power with the simplistic beauty of modular, component-based UIs powered by React. Throw in some Node for isomorphic/universal JavaScript, and you’ll achieve Zen.

Happy reading, and let me know how you like the book by leaving a review on Amazon.com (http://amzn.to/2gPxv9Q).