kentcdodds / modern-react Goto Github PK
View Code? Open in Web Editor NEWworkshop about React's hottest new features in 16.7.0
Home Page: https://codesandbox.io/s/github/kentcdodds/modern-react
workshop about React's hottest new features in 16.7.0
Home Page: https://codesandbox.io/s/github/kentcdodds/modern-react
Topics:
React.lazy
React.pure
react-cache
)useAPI
useCallback
useContext
useEffect
useLayoutEffect
?useMemo
useMutationEffect
?useReducer
useRef
useState
Examples:
useState
useRef
useEffect
useRef
(useAPI
?)useState
useEffect
useReducer
(a la redux)useReducer
(a la setState)useContext
React.lazy
React.pure
Continous to this issue I'm getting error thrown at me saying flushEffects isn't an error.
Without flushEffects() at line 19 my tests pass fine.
I'm not familiar with react-testing-library so I don't know if it's issue with my env or a known issue. Can anyone shed light how I can fix it?
Thanks.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.