StaffCoder
React Native
React NativeReact Native 0.81
12 modules · 47 challengesSign up
Modules12 modules · 47 challenges
The input layer of a React Native app. TextInput values are controlled — held on the component that owns them — and non-numeric or oversize input is filtered before it ever reaches state. Every derived value (weighted total, letter grade, refundable ceiling, character count, submit-disabled flag) is recomputed on each render rather than mirrored into a second useState. Validation runs on blur and on submit, never on every keystroke, and each rule surfaces its own message on its own field. Keyboard-driven focus chains use useRef with returnKeyType and blurOnSubmit, and KeyboardAvoidingView selects its behaviour per platform.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Course Grade Entry

Sign up to unlock
—No data yeteasy
About this challenge

A tutor's grade entry screen. A controlled numeric TextInput per assessment component holds its value as a string so a cleared field stays empty rather than becoming zero; non-numeric characters never reach state. The weighted total and letter grade update live from the entered marks and their weightings and are derived on every render — never mirrored into state. Save is blocked with its own message on any empty or over-max field, a mark exactly at maxMark is accepted, and a total narrowly below a grade boundary warns for moderation without blocking.

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

Contractor Onboarding Form

Sign up to unlock
—No data yeteasy
About this challenge

A staffing agency's onboarding form. Four controlled inputs — full name, payroll reference, assignment end date (YYYY-MM-DD), right-to-work expiry — validated only on blur or on submit, never on every keystroke. Assignment end must land within a fixed horizon from today; right-to-work expiry must be on or after the assignment end. Each rule surfaces its own message on its own field, submit unlocks only when every field is valid, and a corrected field clears its own message without touching any other field's.

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

Consultation Note Entry

Sign up to unlock
—No data yeteasy
About this challenge

A clinician's consultation note screen. Four fields chain together so pressing "next" on the keyboard moves focus down through useRef refs with blurOnSubmit false, and the last field blurs the keyboard instead. The multiline notes area uses numberOfLines and textAlignVertical for top-aligned long text, shows a live character count against the record limit, and hard-caps entry at the limit — including on a paste. KeyboardAvoidingView selects padding on iOS and height on Android so the keyboard never occludes the notes area.

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

Merchant Refund Request

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

A merchant refund request form. The refundable ceiling is derived from the original transaction less what has already been refunded; the amount is validated against the ceiling and classified as full (exactly at ceiling) or partial (below); the reason list is filtered by the classification and a previously-selected code no longer offered is cleared. useWindowDimensions drives a one-vs-two-column layout at a documented breakpoint while preserving entered values across a resize (no remount); Platform.select branches the amount keyboardType and the submit style.

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.