Giter Club home page Giter Club logo

modern-react's Issues

Subjects

Topics:

  • React.lazy
  • React.pure
  • Fundamental React Suspense
  • React Suspense (with react-cache)
  • useAPI
  • useCallback
  • useContext
  • useEffect
  • useLayoutEffect?
  • useMemo
  • useMutationEffect?
  • useReducer
  • useRef
  • useState
  • Custom hooks

Examples:

  1. Counter:
  • useState
  1. useCount
  • Custom hooks
  1. VanillaTilt:
  • useRef
  • useEffect
  1. useVanillaTilt
  • Custom hooks
  1. StopWatch
  • useRef (useAPI?)
  • useState
  • useEffect
  1. StopWatch:
  • useReducer (a la redux)
  1. StopWatch:
  • useReducer (a la setState)
  1. useStopWatch:
  • Custom hooks
  1. FetchPokemon:
  • Fundamental Suspense
  1. FetchPokemon
  • Suspense with react-cache
  1. FetchPokemon
  • useContext
  1. FetchPokemon
  • React.lazy
  1. Contrived Component within another
  • React.pure
  1. When to not use hooks:
  • Outside render phase
  • In class component
  • Conditionally
  • In a loop

Review

Hey @sophiebits, @acdlite, and @gaearon ๐Ÿ‘‹

I'm planning on using this for teaching material to teach PayPal engineers as well as create workshops and video material about cool stuff coming in React 16.7.0 (after you've announced the features of course). All the material I develop for this initial release will be available for people to learn from for free :)

If you could please review the code in https://github.com/kentcdodds/modern-react/tree/master/src/exercises-final to make sure that I'm not doing something odd/wrong with these features that would be really helpful! I want to make sure that when these features are released there's some material out there for people to learn about them.

If you want to run this stuff, you can run the setup script and then copy over the builds of React that you have with these features.

Remove flushEffects from test 3

In tests/03.js, the function flushEffects() is imported on line 2 and called on line 19 which causes an error.

Removing flushEffects from the import and from line 19 fixes the error and lets the test pass.

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.