Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
ReactJS by Example - Building Modern Web Applications with React

You're reading from  ReactJS by Example - Building Modern Web Applications with React

Product type Book
Published in Apr 2016
Publisher Packt
ISBN-13 9781785289644
Pages 280 pages
Edition 1st Edition
Languages
Author (1):
Vipul A M Vipul A M
Profile icon Vipul A M

Table of Contents (20) Chapters

ReactJS by Example - Building Modern Web Applications with React
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with React 2. JSX in Depth 3. Data Flow and Life Cycle Events 4. Composite Dynamic Components and Forms 5. Mixins and the DOM 6. React on the Server 7. React Addons 8. Performance of React Apps 9. React Router and Data Models 10. Animation 11. React Tools 12. Flux 13. Redux and React Index

Preface

ReactJS is an open source JavaScript library that intends to bring aspects of reactive programming to web applications and sites. It aims to address the challenges encountered in developing single-page applications. React's core principles are declarative code, efficiency, flexibility, and improved developer experience.

What better way of learning a new technology than diving deep into it while working on something? This book will guide you with the help of different projects, each focusing on the specific features of React in your journey of mastering React. We will cover everything from JSX, add-ons, performance, and Redux.

Let the journey commence!

What this book covers

Chapter 1, Getting Started with React, covers the basics of ReactJS by building a simple app with static data. We will study top-level API of React and its basic building blocks.

Chapter 2, JSX in Depth, does a deep dive into JSX and how to use it with React. We will also look at a few gotchas that need to be considered while working with JSX.

Chapter 3, Data Flow and Life Cycle Events, focuses on data flow between React components and complete life cycle of a component.

Chapter 4, Composite Dynamic Components and Forms, shows how to build composite dynamic components using React with more focus on forms while building a form wizard application.

Chapter 5, Mixins and the DOM, covers mixins, refs, and how React interacts with DOM.

Chapter 6, React on the Server, uses React on the server side to render HTML and learn more about what server-side rendering brings to the table by building a search application based on Open Library Books API.

Chapter 7, React Addons, continues to use the search application and enhances it with various add-ons provided with React. We will study the use cases of these add-ons.

Chapter 8, Performance of React Apps, discusses everything about the performance of the React app by going deep into how React renders the content and helps in making our apps faster.

Chapter 9, React Router and Data Models, helps in building a Pinterest-style application and discusses routing using react-router. We will also discuss how various data models can be used with React, including Backbone models.

Chapter 10, Animation, focuses on making our Pinterest app more interactive with animations and how to use them effectively with React.

Chapter 11, React Tools, takes a step back and discusses various tools that we will use in our journey while working with React. We will study the tools such as Babel, ESLint, React dev tools, and Webpack.

Chapter 12, Flux, explains how to build a social media-tracker application while using the Flux architecture. We will discuss the need for the Flux architecture and what it brings to the table.

Chapter 13, Redux and React, covers using Redux—a popular state management library—to enhance the social media-tracker application further in order to use Redux-based state management.

What you need for this book

You will need to have a modern web browser, such as Chrome or Firefox, to run the examples from the book. You will also need to have Node.js—https://nodejs.org/en/—installed with the npm package manager set up. Additional setup instructions can be found at https://github.com/bigbinary/reactjs-by-example.

Who this book is for

If you are a web developer and wish to learn ReactJS from scratch, then this book is tailor-made for you. Good understanding of JavaScript, HTML, and CSS is expected.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Notice, how we are using this.props.headings to access the passed information about headings."

A block of code is set as follows:

return <div>
         <h1>Recent Changes</h1>
           <table>
          ….
          </table>
         </div>
…

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

    TestUtils.Simulate.click(submitButton);
    expect(app.state.searching).toEqual(true);
    expect(app.state.searchCompleted).toEqual(false);
    let spinner = TestUtils.findRenderedComponentWithType(app, Spinner);
    expect(spinner).toBeTruthy();

Any command-line input or output is written as follows:

Listening at localhost:9000
Hash: 8ec0d12965567260413b
Version: webpack 1.9.11
Time: 1639ms

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Did you notice the Auto-run JS option?"

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.

lock icon The rest of the chapter is locked
You have been reading a chapter from
ReactJS by Example - Building Modern Web Applications with React
Published in: Apr 2016 Publisher: Packt ISBN-13: 9781785289644
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 €14.99/month. Cancel anytime}