StaffCoder
React (Typescript)
13 modules · 53 challengesSign up
Modules13 modules · 53 challenges
Context & Shared State is a graduated React path where each question hands the candidate a finished UI and asks only for the pure logic behind shared state - what lives in context, how it changes, and who re-renders. It climbs from a permission-checked auth context, through a reducer-backed notification queue and a selector-subscribed store, up to a cached resource context (mini react-query) that composes it all.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Role-Based Access Context

Sign up to unlock
—No data yetmedium
About this challenge

In a SaaS admin app, auth state and a permission check are exposed through context, but the permission helper and the login/logout transitions are unimplemented, so `can(...)` never returns the right answer and signing in or out does not change what a consumer may see.

Solved in a browser IDE and graded by tests. Sign up to solve

Notification Center

Sign up to unlock
—No data yetmedium
About this challenge

The app needs a real app-wide notification center - a queue, not a single toast. The provider and the toast list UI are provided and wired, but the queue reducer and the auto-dismiss scheduling are missing, so notifications never appear, never collapse duplicates, and never time out.

Solved in a browser IDE and graded by tests. Sign up to solve

Re-render-Optimized Store Context

Sign up to unlock
—No data yetmedium
About this challenge

A dashboard has many widgets reading one shared store. Today every store update re-renders every consumer. The store provider and the widgets are provided; the subscription mechanism that isolates re-renders is missing, so an unrelated update repaints the whole board.

Solved in a browser IDE and graded by tests. Sign up to solve

Cached Resource Context

STAR
Solving it completes the module
—No data yetmedium
About this challenge

Build a lightweight data-cache context - a mini react-query - that fetches, caches, de-dupes in-flight requests, and invalidates by key. The provider, the consuming widgets, and the API base configuration are provided; the cache logic and the `useResource` hook are missing, so every consumer refetches and nothing is shared.

Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.