• Complain

Preston So - Gatsby: The Definitive Guide

Here you can read online Preston So - Gatsby: The Definitive Guide full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2021, publisher: OReilly Media, Inc., genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Preston So Gatsby: The Definitive Guide
  • Book:
    Gatsby: The Definitive Guide
  • Author:
  • Publisher:
    OReilly Media, Inc.
  • Genre:
  • Year:
    2021
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Gatsby: The Definitive Guide: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Gatsby: The Definitive Guide" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Preston So: author's other books


Who wrote Gatsby: The Definitive Guide? Find out the surname, the name of the author of the book and a list of all author's works by series.

Gatsby: The Definitive Guide — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Gatsby: The Definitive Guide" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Gatsby The Definitive Guide by Preston So Copyright 2022 Preston So All - photo 1
Gatsby: The Definitive Guide

by Preston So

Copyright 2022 Preston So. All rights reserved.

Printed in the United States of America.

Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.

OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .

  • Editors: Jeff Bleiel and Amanda Quinn
  • Production Editor: Katherine Tozer
  • Interior Designer: David Futato
  • Cover Designer: Karen Montgomery
  • Illustrator: Kate Dullea
  • November 2021: First Edition
Revision History for the Early Release
  • 2020-12-21: First Release
  • 2021-03-16: Second Release
  • 2021-04-15: Third Release
  • 2021-05-26: Fourth Release
  • 2021-07-07: Fifth Release

See http://oreilly.com/catalog/errata.csp?isbn=9781492087519 for release details.

The OReilly logo is a registered trademark of OReilly Media, Inc. Gatsby: The Definitive Guide, the cover image, and related trade dress are trademarks of OReilly Media, Inc.

The views expressed in this work are those of the author, and do not represent the publishers views. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.

978-1-492-08751-9

Chapter 1. Gatsby Fundamentals
A note for Early Release readers

With Early Release ebooks, you get books in their earliest formthe authors raw and unedited content as they writeso you can take advantage of these technologies long before the official release of these titles.

This will be the 1st chapter of the final book.

If you have comments about how we might improve the content and/or examples in this book, or if you notice missing material within this chapter, please reach out to the author at pso@post.harvard.edu.

Gatsby is an open-source framework for building websites, based on React. Though commonly referred to as a static site generator, Gatsby is also referred to a web compiler due to its focus on more than just static sites. Part of the Jamstack category of technologies, alongside frameworks like Gridsome and Next.js, Gatsby confers special emphasis on performance, scalability, and security, with a rich and growing ecosystem of plugins, themes, recipes, starters, and other contributed projects.

In this first chapter, we get acquainted with Gatsby. Though Gatsbys building blocks are pages and components, its internal data layer, made up of GraphQL and source plugins, bridges data from a variety of sources to a variety of settings. Because Gatsbys pages and components are compiled at build time, Gatsby is part of the Jamstack category of technologies. Gatsby is built on React, so well look at JavaScript and React concepts that are essential for Gatsby developers. Finally, well build our first Gatsby hello world site, which will familiarize us with Gatsbys developer tooling.

1.1 What is Gatsby?

In short, Gatsby is a free and open-source framework based on React for creating websites and web applications. But internally, its creator Kyle Mathews describes Gatsby is a complex and robust web compilera collection of building blocks that engage in data retrieval and rendering, page composition using components, linking across pages, and finally, compilation into a working static site.

In this section, we inspect Gatsbys overarching architecture from a birds-eye view to help us understand its major components. In addition, we take a closer look at the three most important components of Gatsby: pages and components, the building blocks of Gatsby; GraphQL and source plugins, which make up the Gatsby data layer; and the Gatsby ecosystem, consisting of plugins that extend Gatsby functionality.

1.1.1 Gatsby pages and components

Gatsby leverages React components as its atomic unit for building websites, whether that means a Gatsby page or a Gatsby component within a page. In other words, everything in Gatsby is built using components. To understand this more deeply, lets take a look at the typical Gatsby project structure:

/|-- /.cache|-- /plugins|-- /public|-- /src |-- /pages | |-- index.js |-- /templates | |-- article.js |-- html.js|-- /static|-- gatsby-config.js|-- gatsby-node.js|-- gatsby-ssr.js|-- gatsby-browser.js

For the purposes of illustrating Gatsbys component-based architecture one-by-one, lets imagine that this Gatsby project consists of a home page (index.js) that links to individual pages that adhere to an article template (article.js). This article template renders the full text of each article into a consistent template for individual articles. To simplify this example even further, lets assume that these articles are coming from an external database rather than from the local file system.

Gatsby has four main types of components, the first three of which we can readily identify in the project structure above:

Page components

Page components become full-fledged Gatsby pages. Any component that is placed under src/pages becomes a page automatically assigned the path suggested by its name. For instance, if you place a contact.js or contact.jsx containing a React component in src/pages, it will eventually be available at example.com/contact/. In order for a file in src/pages to become a page, it must resolve to a string or React component.

Page template components

For relatively static pages, page components work well. But for pages that are templates, such as our article template, we need a repeatable boilerplate according to which well render each article. It would be prohibitive to write a page component for each individual article, so instead of doing that, we prefer to write a single page template component through which all article data will flow. Page templates are located under the src/templates directory.

The HTML component

There is only one HTML component, and it is src/html.js. The src/html.js file is responsible for all concerns that are outside the area of the page that Gatsby controls. For instance, you can modify metadata contained in the

element and add other markup. Customizing this file is optional, as Gatsby also has a default html.js that it uses as a fallback.Non-page components

These are the typical in-page React components. They are sections of a page, such as a header, that is embedded in a larger page component, forming a hierarchy. As well see later in the chapter, there are some non-page components that have greater importance, such as the layout component. In our sample Gatsby codebase above, we dont see a src/components directory, but this would be where our non-page components would appear.

The three types of components that most Gatsby developers will spend the most time in are page components, page template components, and non-page components. But how does Gatsby know what data to use to populate the props in those components? Thats where GraphQL and Gatsbys data layer comes in.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Gatsby: The Definitive Guide»

Look at similar books to Gatsby: The Definitive Guide. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Gatsby: The Definitive Guide»

Discussion, reviews of the book Gatsby: The Definitive Guide and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.