Skip to content

A collection of React (v18, v17) CodeSandboxes I use during workshops

Notifications You must be signed in to change notification settings

gpichot/react-sandboxes

Repository files navigation

React Sandboxes

Repository used to store all sandboxes that I used during workshops.

Sandboxes

context-api

Description Link
πŸ”­ Create context: theme context with setters Open in CodeSandbox
🏈 Showcase creating a Custom Provider and Hook for Context Open in CodeSandbox

forms

Description Link
πŸ”­ React Hook Form Basic example Open in CodeSandbox
πŸ”­ React Hook Form Connected Components Open in CodeSandbox
πŸ”­ React Hook Form Validation examples Open in CodeSandbox

hooks

Description Link
πŸ”­ Hooks: flow Open in CodeSandbox
πŸ”­ useDebugValue: useCounter example Open in CodeSandbox
πŸ”­ useImperativeHandle: inversion of control with input focus Open in CodeSandbox
πŸ”­ useLayoutEffect: Counter Example Open in CodeSandbox
πŸ”­ useLayoutEffect: scroll example Open in CodeSandbox
πŸ”­ useReducer example: Increment/Decrement Open in CodeSandbox
πŸ”­ useRef: long-live objects example Open in CodeSandbox
πŸ”­ useRef: select textarea content on mount Open in CodeSandbox
πŸ”­ useState: Batching Open in CodeSandbox
πŸ”­ useState: Example Open in CodeSandbox
πŸ”­ useState: illustrate pitfall with imperative programming Open in CodeSandbox

mobx-mst

Description Link
πŸ”­ MobX-state-tree example with NFT Pricing Open in CodeSandbox

optimization

Description Link
🏈 Exercise: code splitting Company Map (Solution) Open in CodeSandbox
🏈 Exercise: code splitting Company Map Open in CodeSandbox
πŸ”­ Context API: Context Update and Children update/Memoization Open in CodeSandbox
🏈 Exercise board for performance optimization Open in CodeSandbox
πŸ”­ pitfall: Creating a component from a component Open in CodeSandbox
🏈 Exercise: context improvements Open in CodeSandbox
πŸ”­ React.memo: memoizing a component Open in CodeSandbox
πŸ”­ Separate context state and setters Open in CodeSandbox

patterns

Description Link
πŸ”­ Compound Components Pattern Open in CodeSandbox
πŸ”­ Flexible Compound Components Pattern Open in CodeSandbox
πŸ”­ Recomposable Component Pattern Open in CodeSandbox

portals

Description Link
πŸ”­ Show event bubbling through portals Open in CodeSandbox
πŸ”­ Simple example of using portals Open in CodeSandbox

react-query

Description Link
πŸ”­ React Query Basics Open in CodeSandbox
πŸ”­ useInfiniteQuery example Open in CodeSandbox
🏈 Exercise: useQuery with nftlist (Solution) Open in CodeSandbox
🏈 Exercise: useQuery with nftlist Open in CodeSandbox

react-router

Description Link
πŸ”­ Basics: Routes, Route & Outlet Open in CodeSandbox
🏈 Exercise: Lazy Loading and Suspense with React Router Open in CodeSandbox
πŸ”­ Lazy loading and suspense Open in CodeSandbox
πŸ”­ Testing with MemoryRouter Open in CodeSandbox

react

Description Link
🏈 Showcase all React JSX basics Open in CodeSandbox

reconciliation

Description Link
πŸ”­ Children & reconciliation Open in CodeSandbox

references

Description Link
πŸ”­ Callback Refs: focusing an input Open in CodeSandbox
πŸ”­ forwardRef: custom input Open in CodeSandbox

testing

Description Link
πŸ”­ React Testing Library & Jest: testing a component Open in CodeSandbox
πŸ”­ React Testing Library: testing a hook Open in CodeSandbox

About

A collection of React (v18, v17) CodeSandboxes I use during workshops

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published