React.js Essentials
eBook - ePub

React.js Essentials

  1. 208 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

React.js Essentials

Book details
Book preview
Table of contents
Citations

About This Book

A fast-paced guide to designing and building scalable and maintainable web apps with React.js

About This Book

  • Build maintainable and performant user interfaces for your web applications using React.js
  • Create reusable React.js components to save time and effort in maintaining your user interfaces
  • Learn how to build a ready-to-deploy React.js web application, following our step-by-step tutorial

Who This Book Is For

If you're a front-end developer with knowledge of jQuery and its libraries, along with frameworks, such as Angular.JS and Backbone.JS, or native JavaScript development, and you wish to use the fastest web user interface library there is, then this book is ideal for you.

What You Will Learn

  • Install powerful React.js tools to make development much more efficient
  • Create React elements with properties and children
  • Get started with stateless and stateful React components
  • Use JSX to speed up your React.js development process
  • Add reactivity to your React components with lifecycle methods
  • Integrate your React components with other JavaScript libraries
  • Utilize the Flux application architecture with your React components
  • Test your React components with Jest test framework

In Detail

Building web applications with maintainable and performant user interfaces is a challenge that many have faced for more than a decade, but no one has risen to this challenge quite like React.js. Today React.js is used by Facebook, Instagram, Khan Academy, and Imperial College London, to name a few. Many new users recognize the benefits of React.js and adopt it in their own projects, forming a fast-growing community. The speed at which React.js has evolved promises a bright future for those who invest in learning it today.

React.js Essentials will take you on a fast-paced journey through building your own maintainable React.js application. Begin by exploring how you can create single and multiple user interface elements. Create stateless and stateful components and make them reactive, learn to interact between your components and lifecycle methods and gauge how to effectively integrate your user interface components with other JavaScript libraries. Delve deep into the core elements of the Flux architecture and learn how to manage your application using stores. Finish by going that extra mile with the Jest test framework, running multiple tests on your application and find solutions to scale it further without complexity.

Style and approach

The book adopts a step-by-step, hands-on approach with ample codes to ensure you learn React.js at a fast pace.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access React.js Essentials by Artemij Fedosejev in PDF and/or ePUB format, as well as other popular books in Computer Science & Object Oriented Programming. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781783551620
Edition
1

React.js Essentials


Table of Contents

React.js Essentials
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Installing Powerful Tools for Your Project
Approaching our project
Installing Node.js and npm
Installing Git
Getting data from the Twitter Streaming API
Filtering data with Snapkite Engine
Creating the project structure
Creating package.json
Reusing Node.js modules
Building with Gulp.js
Creating a web page
Summary
2. Create Your First React Element
Understanding the virtual DOM
Installing React
Creating React Elements with JavaScript
The type parameter
The props parameter
The children parameter
Rendering React Elements
Creating React Elements with JSX
Summary
3. Create Your First React Component
Stateless versus stateful
Creating your first stateless React component
Creating your first stateful React component
Summary
4. Make Your React Components Reactive
Solving a problem using React
Planning your React application
Creating a container React component
Summary
5. Use Your React Components with Another Library
Using another library in your React component
Understanding React component's lifecycle methods
Mounting methods
The getInitialState method
The componentWillMount method
The componentDidMount method
Unmounting methods
The componentWillUnmount method
Summary
6. Update Your React Components
Understanding component lifecycle's updating methods
The componentWillReceiveProps method
The shouldComponentUpdate method
The componentWillUpdate method
The componentDidUpdate method
Setting default React component properties
Validating React component properties
Creating a Collection component
Summary
7. Build Complex React Components
Creating the TweetList component
Creating the CollectionControls component
Creating the CollectionRenameForm component
Creating the Button component
Creating the CollectionExportForm component
Summary
8. Test Your React Application with Jest
Why write unit tests?
Creating test suits, specs, and expectations
Installing and running Jest
Creating multiple specs and expectations
Testing React components
Summary
9. Supercharge Your React Architecture with Flux
Analyzing your web application's architecture
Understanding Flux
Creating a dispatcher
Creating an action creator
Creating a store
Summary
10. Prepare Your React Application for Painless Maintenance with Flux
Decoupling concerns with Flux
Refactoring the Stream component
Creating CollectionStore
Creating CollectionActionCreators
Refactoring the Application component
Refactoring the Collection component
Refactoring the CollectionControls component
Refactoring the CollectionRenameForm component
Refactoring the TweetList component
Refactoring the StreamTweet component
Build and go beyond
Index

React.js Essentials

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: August 2015
Production reference: 1250815
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78355-162-0
www.packtpub.com

Credits

Author
Artemij Fedosejev
Reviewers
Denis Radin
Sander Spies
Konstantin Tarkus
Commissioning Editor
Dipika Gaonkar
Acquisition Editor
Nikhil Karkal
Content Development Editor
Pooja Nair
Technical Editor
Pramod Kumavat
Copy Editor
Rashmi Sawant
Project Coordinator
Bijal Patel
Proofreader
Safis Editing
Indexer
Priya Sane
Graphics
Sheetal Aute
Production Coordinator
Shantanu N. Zagade
Cover Work
Shantanu N. Zagade

Foreword

Are you tired of writing jQuery callback soup? Does your blood boil when you need to write yet another template or configuration in your Angular app? Wondering why your application structure is so complex? If so, React.js is what you've been looking for. The declarative nature of React.js will help you build a UI for large applications with data that changes over time.
As a professional iOS and JavaScript frontend consultant, I always recommend that clients use the best technology available. With the latest push from Facebook, React.js has proven itself to be a solid choice to build maintainable and performant user interfaces that help our clients ship products and move fast. I was excited the moment I heard about React.js Essentials and even more excited about getting my hands on a copy.
Artemij Fedosejev, a veteran web developer and technical lead at a start-up company in London, demonstrates why a declarative programming style and one-way reactive data flow is often the best way to solve real-life programming problems. Whether you're working with consumer-facing applications or university research, React.js helps you build frontend UIs on both small and large scales. You'll never be lost in code again. Learn from Artemij's real-world experience in React.js Essentials, and you'll be creating user interfaces without increasing the complexity of your web application in no time.
This book has everything you need to get started with React.js. It guides you from the first steps down to the intricacies of Jest. The best way to learn is by doing, and throughout this book, you will work on a hands-on React.js project and learn how to build an application that receives and collects the latest photos from Twitter.
Software is constantly evolving and always moving forward. As developers, while practicing our craft, we always reach out to new horizons that stretch and improve our understanding of how great software should be built. Historically, software development and architecture has gone from structured programming to imperative programming. This made way for object-oriented programming (OOP) to become the de facto standard of software development today. Lan...

Table of contents

  1. React.js Essentials