GithubHelp home page GithubHelp logo

reacttraining / classic-react-workshop Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 508.0 11.81 MB

Lectures and exercises for React Training workshops

Home Page: https://reacttraining.com

JavaScript 99.18% CSS 0.82%

classic-react-workshop's People

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  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  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  avatar

classic-react-workshop's Issues

Fix failing tests

Currently, the tests for 02-Components and 03-Props-vs-State are failing in React 16. I believe it's a regression in React 16, so I filed an issue in facebook/react#12772

Tracking here so we can follow up when it's resolved.

JS Primer has a duplicate example

In the section for Arrow Functions, it reads:

// which can be shorter with explicit expression return
const add = (x, y) => x + y;

// if we want multiline, we can create an expression with ()
const add = (x, y) => x + y;

These seem the same, but I think the second example is supposed to be different.

Cannot run npm install

On running npm install i get this error.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! path /media/programmersedge/New_Volume/devs/react-workshop/node_modules/supervisor/lib/cli-wrapper.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/media/programmersedge/New_Volume/devs/react-workshop/node_modules/supervisor/lib/cli-wrapper.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/programmersedge/.npm/_logs/2018-03-19T12_53_37_108Z-debug.log

Failed to compile

Failed to compile.

./subjects/17-Chat-App/utils.js
Module not found: Error: Can't resolve 'firebase/app' in 'C:\Users\Admin\Downloads\classic-react-workshop\subjects\17-Chat-App'

node build.js > "subjects/ReduxDataFlow/lecture.html doesn't exist"

webpack-dev-server runs fine but when i run node scripts/build.js i get following error:

return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);

Error: ENOENT: no such file or directory, open '/Users/apple/Work/react-subjects/subjects/ReduxDataFlow/lecture.html'

ReduxDataFlow doesn't exist in subjects dir.

Hi

Why u did remove Calculator exercise?

How can I avoid mapping over Children while completing the Tabs example?

Hey @mjackson @ryanflorence 👋

While completing your Tabs example in the Advanced React course, I ported it to the new Context api: https://codesandbox.io/s/01p15lx5rn

But this mapping over children is still bothering me.

<TabsContext.Consumer>
      {({ activeIndex, onActivate }) => {
        const children = React.Children.map(
            this.props.children,
            (child, index) =>
              React.cloneElement(child, {
                isActive: index === activeIndex,
                onClick: () => onActivate(index)
              })
          );
        return <div style={styles.tabList}>{children}</div>;
     }}
 </TabsContext.Consumer>

Mapping over children to pass them props might end up breaking the ui and the api contract for children if someone inserts a div in between. How do I pass onClick and isActive flag to children without mapping over children?

I there any way to avoid it? 🙁

npm error

npm ERR! code 1
npm ERR! path C:\Users\Admin\Downloads\classic-react-workshop\node_modules\grpc
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c ./node_modules/.bin/node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! '.' n'est pas reconnu en tant que commande interne
npm ERR! ou externe, un programme ex�cutable ou un fichier de commandes.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Local\npm-cache_logs\2021-08-12T11_49_24_573Z-debug.log

Support React 0.14 and Components as Functions

Was looking through the workshop resources and was curious about the possibility of introducing components as just functions. May be a useful path into introducing the idea of composition and showing how much you are able to accomplish with this model without having to use classes for managing state.

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.