• Complain

Sara Vieira - The Opinionated Guide To React

Here you can read online Sara Vieira - The Opinionated Guide To React full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2020, publisher: anonymous, genre: Home and family. 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.

Sara Vieira The Opinionated Guide To React
  • Book:
    The Opinionated Guide To React
  • Author:
  • Publisher:
    anonymous
  • Genre:
  • Year:
    2020
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

The Opinionated Guide To React: summary, description and annotation

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

Sara Vieira: author's other books


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

The Opinionated Guide To React — 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 "The Opinionated Guide To React" 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
Opinionated Guide to React
The Book

This book is not supposed to ever serve as a teaching mechanism for React, but more of a way to see React from the eyes of someone who has been using it for years and got sick of the "it depends".All I will show you here are things that either I use(d) or things developers I trust have used.

Also, opinions will be shared that you may agree with or not, but my objective with this book is to show the options and my point of view.

I hope you enjoy this book and have some fun writing web apps and making some amazing buttons.

About the author

I am never the best person to talk about myself, so I asked twitter, some of the answers were good, some bad and some just funny.

One of them was just amazing, and so it will be the one I use here:


It's my great honor to introduce you to my (spiritual) little sister, Sara Vieira. While I cannot paint a complete portrait of her in precious few words, I will attempt to highlight what I admire most about her.

Despite her insistence otherwise, she's one of the smartest people you are ever going to meet. Sara possesses a profoundly unique talent to take difficult or mundane topics and infuse them with clarity and humor. When you meet her, you cannot help but be inspired and delighted by her affable demeanor and sharp wit. Sara is a fierce advocate for the underrepresented, the undervalued, and those would otherwise lack the same opportunities as her. She speaks English better than most Americans (present company included.) And while Sara quick to make fun of her native Portugal, she's even quicker to tell you to **** off for disparaging her ptria. She's a rare and respected voice for mental health in the tech industry that advocates for mental health and inclusivity. During the day, Sara works at https://codesandbox.io where she's a Berlin-base frontend engineer. When not saving the world one clever meme at a time, Sara is a renowned public speaker, an accomplished conference organizer, and an amazing spouse to her wife.

And I'm lucky enough to call her my friend. I hope you enjoy her book; I know I will. You are supporting one of my favorite humans and doing yourself a huge favor by absorbing a bit of her wisdom. I hope you get to meet her some day; you too can see she's pretty indescribable.

Brian Holt

Senior Program Manager

Visual Studio Code & JavaScript on Azure

Microsoft

What will you learn?

Probably not how to use React from the basics but a clearer picture of how bigger React apps work, a bit of the tools they use, the ups and downs, their structure, also some knowledge on how to use these tools yourself and a lot of hooks.We will start with some things like folder and name structure and then go into packages, starter kits and much more.

What I hope is not that you follow everything I say blindly but that you consider these options and these packages as something to make use of in the future, my hope is that by the end the React world becomes easier to navigate.

Folder/ File Structuring

In this chapter, we will be talking about how I usually structure applications in terms of folder position, file exports, and some other small tidbits.

Folder

In apps and websites I have built with React, I tend to have a similar structure that seems to work and that looks like so:

. src | index.js | components/ | button/ | index.js | elements. ( js/css ) | pages/ | homepage/ | screens/ | hero/ | index.js | elements. ( js/css ) | index.js | elements. ( js/css ) | index.js | utils/ | hooks/ | useLocalStorage.js | date.js | assets/ | icons/ | images/

In the core, I have four main folders:

  • components - This is where components used by more than one page or module get placed. These things usually don't quite belong in a design system. One example could be a SaveButton: this will be an extension of the Button with some differences that will be used in a lot of places, but unlike the Button it doesn't quite belong in a design system.If no design system is in place, basically anything that's used by more than one page or component like an Alert should go here.

  • pages- This is where your main pages will be. This folder will have an index.js, the place from which your routes file will import all the pages in your app. Usually, within a page you can have multiple sections like a hero. This hero component won't be used anywhere else, but it's a crucial part of this particular page. It should have both its own index.js and a styles file so we can put this in a separate folder to minimize the size of our files, while also making it easier to find things.

  • assets - The assets folder will contain all your images and icons. I usually have both, so I find it easier to divide the folders: most of the time, my icons will be in SVG, and these get translated into JSX, so end up also being JavaScript files at their core. I did that so many times in random websites I even made a desktop application for it that you can download at svg-jsx.netlify.com and a Figma plugin to do the exact same thing and if you use Figma the plugin can be found in the figma community

  • utils - This is where your overly complicated functions go. Making a utils folder is kind of like hiding the shame, but in a calculated way. Let's say you need to transform dates in a component, and it's a pretty heavy function. In my opinion, this should be its file, maybe generalized to dates so it can export several functions for date manipulation - trust me, there will always be date manipulation.In this folder, I would also include any hooks you may create for this particular project.

This structure assumes I don't have a global state management solution, and in case I do, there are usually two options: Using just context and using Overmind(we will get into overmind later).

In case I am only using context, I would have a folder like:

. context | userContext.js | anotherContext.js | index.js

The idea is to separate your concerns and make each different context it's own file so you can easily change any of them and they are isolated.

I will not go through Overmind because it won't make much sense until we talk about it. Trust me it's great! It powers all of CodeSandbox.

File naming

I always try to name my files index.js and let the folder name do the talking. This will allow me to have more freedom in the composition of that component or page, as more files may be added, and that way they all stay concise in that folder. So I may have something like:

src/components/Alert/index.js

Even though it's the index file, the way module resolution works in JavaScript is that you don't need to specify index.js so you can just import like you would a file:

import Alert from "./components/Alert" ;

This will look for the file Alert.js, and then if it doesn't find that it looks for the folder and an index file within it, so don't worry about more typing.

Let's say this Alert component is weirdly complicated for an alert; it can also have components of itself. In many cases I see myself having a components folder inside a component like so:

. Alert | index.js | elements. ( js/css ) | components/ | form/ | index.js | elements. ( js/css )

As everything in this book it's a preference I have, smaller files over less folders.

Exporting Components

For many years, I used the good old export default

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «The Opinionated Guide To React»

Look at similar books to The Opinionated Guide To React. 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 «The Opinionated Guide To React»

Discussion, reviews of the book The Opinionated Guide To React 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.