Install any skill in seconds. Free to start, no credit card required.
Get Started Free →rohitg00/react-patterns
React 19 patterns including Server Components, Actions, Suspense, hooks, and component composition
Passed 22 of 23 test cases with the skill, and 21 of 23 without it.
1 fixed21 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
We are writing a React component where context reading must happen only when a conditional boolean flag is true during render. How should context be read in this component?
| Checked | Without skill | With skill |
|---|---|---|
| Calls the use hook inside the conditional block | Missed | Passed |
The instructions your model reads when the skill loads.
use() reads values from Promises and Context directly in render. Unlike other hooks, it can be called inside conditionals and loops.
import { use } from 'react';
function UserProfile({ userPromise }: { userPromise: Promise<User> }) {
const user = use(userPromise);
return <h1>{user.name}</h1>;
}
function ThemeButton() {
const theme = use(ThemeContext);
return <button style={{ background: theme.primary }}>Click</button>;
}
Wrap components that use use() with a Promise in a <Suspense> boundary.
// app/users/page.tsx - Server Component (default, no directive needed)
import { UserList } from './UserList';
export default async function UsersPage() {
const users = await fetch('https://api.example.com/users', {
next: { revalidate: 60 },
}).then(r => r.json());
return <UserList users={users} />;
}
// app/users/UserList.tsx - Still a Server Component
export function UserList({ users }: { users: User[] }) {
return (
<ul>
test cases passed, vs 21 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.