Corge.dev

React

intro to react

note about react

Hooks

use

experimental: only available in React's Canary

use(resource)

useCallback

React Hook that lets you cache a function definition between re-renders

fn

function value that you want to cache

dependencies

The list of all reactive values referenced inside of the fn code

useContext

React Hook that lets you read and subscribe to context from your component

SomeContext

The context that you've previously created with createContext

useEffect

React Hook that lets you synchronize a component with an external system

setup

The function with your Effect's logic

dependencies

optional: The list of all reactive values referenced inside of the setup code

useState

React Hook that lets you add a state variable to your component

initialState

The value you want the state to be initially.

Components

<Fragment>

lets you group elements without a wrapper node

Basic Example

download

...

href

...