Git Product home page Git Product logo

react-book's Introduction

react-book's People

Contributors

zgordon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-book's Issues

07-props/starter issue

I've tried to bring up the 07-props/starter directory in my terminal and run npm install, but when I do so, I get a bunch of warnings that things are deprecated, and then I get an error that the maximum call stack size is exceeded. I'm new. Maybe I'm making a mistake, but I have the latest version of node and npm on my computer.

React Router has upgraded from v5 to v6 (Impact on the whole project)

The beginning steps of "A React Project" have been rendered outdated in the 2020 edition of the book, as React Router has moved on to v6 on November 3, 2021. As such, certain parts mentioned will not work anymore, such as:

import {
  BrowserRouter as Router,
  Switch, // Switch has been changed to "Routes"
  Route,
  Redirect,
} from "react-router-dom";

On top of that, <Route /> will not work as the provided code in step 02 has it now, even after the name substitution from Switch to Routes. Page will render blank and display this warning in the console:
image

<Route /> now only supports an element prop, which is incompatible with the current code structure. A name substitution such as render to element will not work either. The following error in console will occur:
image

The above issue can be remedied if the line

<Route exact path="/" render={() => <Posts posts={posts} />} />

is changed to

<Route exact path="/" element={<Posts posts={posts} />} />

A similar issue as the one just mentioned is present for the block of code responsible for rendering a single post:

<Route
            path="/post/:postSlug"
            render={(props) => {
              const post = posts.find(
                (post) => post.slug === props.match.params.postSlug
              );
              if (post) return <Post post={post} />;
              else return <NotFound />;
            }}
          />

Chapter 08, Exercise Practice3.js,

The code for the UserForm is given as
const UserForm = props => (

{props.label}: //Incorrect

);

This seems incorrect. At least the last double quotes should be removed for the state to update. The works for me: for example,

{props.label}: //REMOVED QUOTES

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.