Book Image

React.js Essentials

By : Artemij Fedosejev
Book Image

React.js Essentials

By: Artemij Fedosejev

Overview of this book

Table of Contents (18 chapters)
React.js Essentials
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Analyzing your web application's architecture


To answer these questions, let's zoom away from the implementation details and explore our application's architecture:

  • The app.js file renders our Application component

  • The Application component manages a collection of tweets and renders our Stream and Collection components

  • The Stream component receives the new tweets from the SnapkiteStreamClient library and renders the StreamTweet and Header components

  • The Collection component renders the CollectionControls and TweetList components

Stop right there. Can you tell how data flows inside our application? Do you know where it enters our application? How does a new tweet end up in our collection? Let's examine our data flow more closely:

  1. We use the SnapkiteStreamClient library to receive a new tweet inside a Stream component.

  2. This new tweet is then passed from Stream to the StreamTweet component.

  3. The StreamTweet component passes it to the Tweet component, which renders the tweet image.

  4. A user clicks on that...