Giter Club home page Giter Club logo

learn-react's Introduction

Archived

๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ

This is archived. If you want to learn React, I recommend The Beginner's Guide to React as a great free resource and EpicReact.dev as a premium resource that will get you really good at React.

Cheers!

๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ ๐Ÿšจ

Learn React

๐Ÿ‘‹ hi there! My name is Kent C. Dodds!

chat-badge Build Status AppVeyor Build Status Code Coverage MIT License All Contributors

PRs Welcome Code of Conduct Watch on GitHub Star on GitHub Tweet

System Requirements

  • git v2.14.1 or greater
  • NodeJS v8.9.4 or greater
  • npm v5.6.0 or greater

All of these must be available in your PATH. To verify things are set up properly, you can run this:

git --version
node --version
npm --version

If you have trouble with any of these, learn more about the PATH environment variable and how to fix it here for windows or mac/linux.

Setup

You may be able to work through the entire workshop in the browser. Go to this codesandbox and you should be good to go. (Note: there are a few exercises in the intro folder which you won't be able to run in codesandbox, but don't require installing any dependencies).

If you'd rather be able to work through the workshop on your own computer, then follow the following instructions.

After you've made sure to have the correct things (and versions) installed, you should be able to just run a few commands to get set up:

NOTE: <branchname> refers to the specific branch you want to clone. Replace that with the branch you were given in the instructions or main if you were not given any specific instructions.

git clone --single-branch --branch <branchname> https://github.com/kentcdodds/learn-react.git
cd learn-react
npm run setup --silent

This may take a few minutes. It will ask you for your email. This is optional and just automatically adds your email to the links in the project to make filling out some forms easier If you get any errors, please read through them and see if you can find out what the problem is. You may also want to look at Troubleshooting. If you can't work it out on your own then please file an issue and provide all the output from the commands you ran (even if it's a lot).

Running the app

To get the app up and running (and really see if it worked), run:

npm start

This should start up your browser. If you're familiar, this is a standard react-scripts application.

You can also open the deployment of the app on Netlify.

Running the tests

npm test

This will start Jest in watch mode. Read the output and play around with it.

Working through it

You'll want to start in the intro/exercises directory where we start with raw React and DOM APIs. Pull open the .html files in your browser and follow along in the comments.

Once you get through those, then start in the src/exercises directory and work through those.

Your goal will be to go into each test, swap the final version for the exercise version in the import, and make the tests pass

Helpful Emoji ๐Ÿจ ๐Ÿ’ฐ ๐Ÿ’ฏ ๐Ÿฆ‰ ๐Ÿ“œ ๐Ÿ’ฃ ๐Ÿšจ

Each exercise has comments in it to help you get through the exercise. These fun emoji characters are here to help you.

  • Kody the Koala Bear ๐Ÿจ will tell you when there's something specific you should do
  • Marty the Money Bag ๐Ÿ’ฐ will give you specific tips (and sometimes code) along the way
  • Hannah the Hundred ๐Ÿ’ฏ will give you extra challenges you can do if you finish the exercises early.
  • Olivia the Owl ๐Ÿฆ‰ will give you useful tidbits/best practice notes and a link for elaboration and feedback.
  • Dominic the Document ๐Ÿ“œ will give you links to useful documentation
  • Berry the Bomb ๐Ÿ’ฃ will be hanging around anywhere you need to blow stuff up (delete code)
  • Peter the Product Manager ๐Ÿ‘จโ€๐Ÿ’ผ helps us know what our users want
  • Alfred the Alert ๐Ÿšจ will occasionally show up in the test failures with potential explanations for why the tests are failing.

Troubleshooting

"npm run setup" command not working

Here's what the setup script does. If it fails, try doing each of these things individually yourself:

# verify your environment will work with the project
node ./scripts/verify

# install dependencies
npm install

# verify the project is ready to run
npm run build
npm run test:coverage

If any of those scripts fail, please try to work out what went wrong by the error message you get. If you still can't work it out, feel free to open an issue with all the output from that script. I will try to help if I can.

Contributors

Thanks goes to these wonderful people (emoji key):

Kent C. Dodds
Kent C. Dodds

๐Ÿ’ป ๐Ÿ“– ๐Ÿš‡ โš ๏ธ
Nathan Hannig
Nathan Hannig

๐Ÿ› ๐Ÿ’ป
Trevor A
Trevor A

๐Ÿ’ป
Brennon Schow
Brennon Schow

๐Ÿ“–
Karl Horky
Karl Horky

๐Ÿ’ป
Jacob Willden
Jacob Willden

๐Ÿ“– ๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

License

This material is available for private, non-commercial use under the GPL version 3. If you would like to use this material to conduct your own workshop, please contact me at [email protected]

learn-react's People

Contributors

agarun avatar allcontributors[bot] avatar greglobinski avatar jacob-willden avatar karlhorky avatar kentcdodds avatar nathanhannig avatar thetrevoradams 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  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

learn-react's Issues

Issue finding "Path"

Screenshot 2023-02-17 at 11 03 22

Got this error after running the setup command, fixed it by updating the 'react-scripts' version to ^3.x.x instead of 3.3.0

Video recording available ?

Hi Kent - Thanks for the codebase. By any chance, do we have a recording of this workshop available somewhere?

Sandbox should have the `glob` dependency?

Hi again @kentcdodds! ๐Ÿ‘‹

Just took a look at these exercises as a potential recommendation for our students at @upleveled, and I noticed that the sandbox is currently failing with an error about a missing glob dependency:

Not sure what dependency chain is causing this, but adding glob in the dependencies seems to have fixed it (see https://codesandbox.io/s/gallant-monad-x9izs).

If you think adding glob to the dependencies is an acceptable solution, then I could add this to the package.json in a pull request.

Cheers again for your work in the community!

Small typo in app.js

Text on screen displays as:
Please learn more by going tothe Learn React repo

Here is the code

Please learn more by going to
<a href="https://github.com/kentcdodds/learn-react">
  the Learn React repo
</a>

As you are aware it just needs a {' '} on the end of the to so space is enforced.

Dependencies not Installing

npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\yallist-71e1f2d3\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\yallist-71e1f2d3\README.md'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\nice-try-50792a39\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\node-bin-setup-10e329b9\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\yallist-71e1f2d3\LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\nice-try-50792a39\README.md'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\node-bin-setup-10e329b9\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\yallist-71e1f2d3\iterator.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\detect-port-alt-5f890c3b\bin\detect-port'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\nice-try-50792a39\LICENSE'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\mkdirp-a91b2897\examples\pow.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\yallist-71e1f2d3\yallist.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\nice-try-50792a39\CHANGELOG.md'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\jsx-ast-utils-991f13ba\lib\values\expressions'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#_compare-by-length.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\fsevents-b3edc91f\node_modules\delegates\test\index.js'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\fsevents-b3edc91f\node_modules'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\bindCallback.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\bindCallback.js.map'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\bindNodeCallback.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\bindNodeCallback.js.map'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\combineLatest.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\combineLatest.js.map'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\concat.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\concat.js.map'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\ConnectableObservable.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\ConnectableObservable.js.map'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\defer.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\rxjs-0d2c9f7a_esm5\internal\observable\defer.js.map'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\core-js-d6ad0093\library\fn\promise\finally.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\core-js-d6ad0093\library\fn\promise\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\core-js-d6ad0093\library\fn\promise\try.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#\filter\implement.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#\filter\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#\filter\is-implemented.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#\filter\shim.js'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#\splice\implement.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#\splice\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#\splice\is-implemented.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#\splice\shim.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\array#\uniq.js'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\test\string#'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\test'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\test\string#\repeat\implement.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\test\string#\repeat\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\test\string#\repeat\is-implemented.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Zaks0n\Desktop\learn-react-master\node_modules.staging\es5-ext-a53bab23\test\string#\repeat\shim.js'
npm ERR! Unexpected end of JSON input while parsing near '...-eslint":"^8.2.5","ba'

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.