README.md raw

React 19 Skill

A comprehensive Claude skill for working with React 19, including hooks, components, server components, and modern React architecture.

Contents

Main Skill File

References

Examples

What This Skill Covers

Core Topics

Best Practices

When to Use This Skill

Use this skill when:

Quick Start Examples

Basic Component

interface ButtonProps {
  label: string
  onClick: () => void
}

const Button = ({ label, onClick }: ButtonProps) => {
  return <button onClick={onClick}>{label}</button>
}

Using Hooks

const Counter = () => {
  const [count, setCount] = useState(0)
  
  useEffect(() => {
    console.log(`Count is: ${count}`)
  }, [count])
  
  return (
    <button onClick={() => setCount(c => c + 1)}>
      Count: {count}
    </button>
  )
}

Server Component

const Page = async () => {
  const data = await fetchData()
  return <div>{data}</div>
}

Server Function

'use server'

export async function createUser(formData: FormData) {
  const name = formData.get('name')
  return await db.user.create({ data: { name } })
}

Related Skills

Resources

Version

This skill is based on React 19.2 and includes the latest features and APIs.