Challenges

110 challenges

Hello React

Introduction to React

Easy
react
props
component
personalization

Dynamic Greeting

Build a reusable Greeting component that personalizes messages based on props.

Easy
react
props
component
personalization

Profile Card

Create a ProfileCard component that accepts and displays multiple props like name, age, and location.

Easy
react
props
component
profile

Default Greeting

Set default props for a Greeting component to display a fallback value when no data is passed.

Easy
react
props
default values
component

Wrapper Component

Create a Wrapper component that accepts and renders content passed as children.

Easy
react
props
children
component

Styled Button

Create a reusable StyledButton component with hover effects using the className prop.

Easy
react
className
tailwindcss
component

Using Fragments

Learn how to group multiple elements using React fragments.

Easy
react
fragments
jsx
grouping

Dynamic List Rendering

Render a dynamic list of items using map and apply the key prop correctly.

Easy
react
map
key
list

Conditional Rendering

Use conditional rendering to display different content based on a boolean prop.

Easy
react
conditional rendering
ternary operator
&&

Click Counter

Handle a button click event to update the component state using useState.

Easy
react
event handling
state
button

Controlled Button

Pass a function from a parent component to a child component and use it to update the parent’s state.

Easy
react
props
event handling
parent-child

Dynamic Styling

Use props to dynamically style components based on input values.

Easy
react
props
dynamic styles
tailwindcss

Default Props

Use default props to provide fallback values when props are not provided.

Easy
react
props
default values

Prop Validation with TypeScript

Define and enforce prop types using TypeScript interfaces.

Easy
react
props
typescript
validation

Children Props

Use the children prop to create a reusable container component.

Easy
react
props
children
component

Embedding Expressions

Premium

Embed JavaScript expressions dynamically in JSX.

Easy
react
jsx
expressions
props

Conditional Rendering

Premium

Conditionally render elements in JSX based on logical expressions.

Easy
react
jsx
conditional rendering
ternary operator

JSX Fragments

Premium

Group multiple JSX elements using React fragments to reduce unnecessary DOM nodes.

Easy
react
jsx
fragments
dom

JSX Comments

Premium

Learn to add comments in JSX to document and explain code.

Easy
react
jsx
comments
documentation

JSX Attributes

Premium

Learn to use static and dynamic attributes in JSX for styling and customization.

Easy
react
jsx
attributes
dynamic styling

JSX Event Handling

Premium

Learn how to handle user interactions in JSX using event handlers like onClick.

Easy
react
jsx
event handling
onClick

JSX Styling

Premium

Learn how to combine inline styles and class-based styles dynamically in JSX.

Easy
react
jsx
styling
dynamic styles

JSX Lists

Premium

Learn how to render lists dynamically in JSX using the map method.

Easy
react
jsx
lists
map

JSX Default Props

Premium

Learn to use default props in React for setting fallback values.

Easy
react
jsx
default props
fallback values

JSX Spread Attributes

Premium

Learn how to use JSX spread attributes to pass props dynamically.

Easy
react
jsx
spread attributes
dynamic props

Basic Counter with State

Premium

Learn to manage component state using the useState hook.

Easy
react
state
useState
hooks

Toggle Component with State

Premium

Learn to manage toggle state using useState in React.

Easy
react
state
useState
toggle

Light Switch Component

Premium

Learn to manage on/off states dynamically with useState.

Easy
react
state
useState
toggle
conditional rendering

Counter with Step

Premium

Learn to dynamically update state using user input and step size.

Easy
react
state
useState
dynamic updates

Text Input Tracker

Premium

Learn to track and display user input dynamically using useState.

Easy
react
state
useState
controlled components

Character Counter

Premium

Learn to count and display the length of user input in real time.

Easy
react
state
useState
dynamic updates

Toggle Theme Component

Premium

Learn to toggle between light and dark themes using useState.

Easy
react
state
useState
useEffect
theme toggling

Counter with Reset Button

Premium

Learn to reset a state variable to its initial value in React.

Easy
react
state
useState
reset

Controlled Input Component

Premium

Learn to create and manage controlled inputs in React.

Easy
react
state
useState
controlled components

Two-Way Data Binding

Premium

Learn to implement two-way data binding with React.

Easy
react
state
useState
two-way data binding

Persisting Counter with Local Storage

Premium

Persist state using localStorage and React’s useEffect hook.

Medium
react
state
useState
useEffect
localStorage

Tabs Component with Active State

Premium

Learn to implement dynamic tabs with active state management.

Medium
react
state
useState
tabs

Counter with Maximum Limit

Premium

Learn to enforce maximum and minimum limits on state variables.

Medium
react
state
useState
limits

Dynamic List Manager

Premium

Learn to manage a list dynamically by adding and removing items.

Medium
react
state
useState
lists

Custom Counter with Step Value

Premium

Learn to adjust state dynamically with user-defined step values.

Medium
react
state
useState
dynamic

Multi-Input Form Handling

Premium

Manage form data with multiple inputs using useState in React.

Medium
react
state
useState
forms
inputs

To-Do List Application

Premium

Implement a simple to-do list app using useState for state management.

Medium
react
state
useState
lists
todo

Functional State Update Counter

Premium

Create a counter that uses the previous state with useState's functional update.

Medium
react
state
useState
functional update

Immutable State Updates

Premium

Manage state with useState by updating objects and arrays immutably.

Medium
react
state
useState
immutability
objects
arrays

Accordion Component with State

Premium

Implement a simple accordion component using useState to manage active panels.

Medium
react
state
useState
accordion
conditional rendering

Advanced Form Validation

Premium

Build a form with multiple fields and advanced validation rules to ensure user input integrity.

hard
react
state
validation
forms
user input

Dynamic Multi-Step Form

Premium

Build a multi-step form where users can navigate between steps, input data, and submit the final result.

hard
react
state
forms
navigation

Custom Hook for Fetching Data

Premium

Create a reusable custom hook for fetching data from APIs and handle loading and error states dynamically.

hard
react
state
hooks
custom hooks
api

Dynamic Shopping Cart

Premium

Build a shopping cart where users can add items, increment quantities, and remove items dynamically.

hard
react
state
list manipulation
dynamic updates

Real-Time Search with Debouncing

Premium

Create a real-time search input that filters a list dynamically, with a debouncing mechanism to optimize performance.

hard
react
state
debouncing
optimization
search

Basic Input Field

Premium

Create a controlled input field that updates its state as the user types.

easy
react
input
state
controlled components

Password Input Field

Premium

Create a controlled input field with a 'Show Password' toggle.

easy
react
input
state
password toggle

Controlled Checkbox

Premium

Manage the checked state of a checkbox using React state.

easy
react
checkbox
state
controlled components

Controlled Select Dropdown

Premium

Build a controlled dropdown menu where the selected value updates the state.

easy
react
select
state
controlled components

Character Limit Input

Premium

Create an input field that enforces a maximum character limit and displays the remaining characters.

easy
react
input
character limit
controlled components

Email Validation Input

Premium

Validate an email input field in real time as the user types.

easy
react
validation
email
controlled components

Number Input with Min/Max

Premium

Create a number input field that enforces minimum and maximum values.

easy
react
number input
min/max
controlled components

Live Preview Input

Premium

Create a text input where the entered text is displayed live in a preview below the field.

easy
react
live preview
state
controlled components

Dynamic Placeholder Input

Premium

Build an input field with a dynamic placeholder that changes based on state.

easy
react
input
state
dynamic placeholder

Read-Only Toggle Input

Premium

Add a toggle to make an input field read-only dynamically.

easy
react
input
read-only
state

Multi-Field Form

Premium

Manage multiple input fields (e.g., name, email, and phone) with a single state object.

medium
react
forms
state
controlled components

Search with Suggestions

Premium

Create a search input that displays suggestions based on the entered text.

medium
react
search
state
suggestions

Validation with Multiple Inputs

Premium

Create a form with multiple inputs and display error messages for invalid fields.

medium
react
validation
forms
controlled components

Text Transformation Input

Premium

Build an input field where the text transforms dynamically (e.g., uppercase, lowercase) as the user types.

medium
react
input
text transformation
state

Auto-Fill Input

Premium

Create an input field with an auto-fill feature that suggests a predefined value.

medium
react
input
state
auto-fill

Dynamic Input Field Generation

Premium

Build a form that allows users to dynamically add or remove input fields.

hard
react
forms
dynamic fields
state

Masking Input (Phone Number)

Premium

Implement a controlled input field that applies a phone number format dynamically (e.g., `(123) 456-7890`).

hard
react
input masking
state
controlled components

Real-Time Markdown Editor

Premium

Create a textarea input that renders a real-time markdown preview.

hard
react
textarea
markdown
preview

Dependent Dropdowns

Premium

Build two dropdowns where the options of the second depend on the selection in the first.

hard
react
dropdowns
state
controlled components

Custom Validation Rules

Premium

Build a form with custom validation rules for multiple input fields, displaying error messages for invalid entries.

hard
react
validation
forms
custom rules

Basic Registration Form

Premium

Create a simple form with a single input and submit button.

easy
react
forms
input
state

Validation Feedback

Premium

Add basic validation to a form and display a message on submit.

easy
react
forms
validation
state

Password Confirmation

Premium

Create a form with password and confirm password fields.

easy
react
forms
password
state

Disable Submit

Premium

Disable the submit button until all form fields are valid.

easy
react
forms
validation
state

Focus Management

Premium

Automatically focus the next input field on enter.

easy
react
forms
focus
state

Dynamic Error Messages

Premium

Show error messages dynamically as the user types.

easy
react
forms
validation
state

Required Checkbox

Premium

Add a required checkbox before submitting a form.

easy
react
forms
checkbox
validation

Prefill Data

Premium

Create a form that pre-fills fields with existing data.

easy
react
forms
prefill
state

Clear Form

Premium

Add a 'Clear All' button to reset the form state.

easy
react
forms
reset
state

Basic Dropdown Form

Premium

Create a form with a dropdown menu to select an option.

easy
react
forms
dropdown
state

Multi-Step Form with Navigation

Premium

Create a basic multi-step form with next and back buttons.

medium
react
forms
multi-step
state

Dynamic Validation Rules

Premium

Add dynamic validation rules that change based on user input.

medium
react
forms
validation
state

Conditional Inputs

Premium

Show or hide input fields based on selected options.

medium
react
forms
conditional rendering
state

File Upload with Preview

Premium

Build a form that allows users to upload files and preview the selected file.

medium
react
forms
file upload
state

Custom Date Picker

Premium

Create a form with a custom date picker input field using state.

medium
react
forms
date picker
state

Form with Progress Bar

Premium

Create a form with a progress bar that updates as fields are completed.

hard
react
forms
progress bar
state

Dependent Dropdowns Form

Premium

Build a form with dependent dropdowns that fetch options dynamically.

hard
react
forms
dropdowns
state

Form with Nested Fields

Premium

Create a form with nested fields (e.g., address fields with subfields).

hard
react
forms
nested fields
state

Form with Live Validation

Premium

Build a form with live validation and conditional error messages.

hard
react
forms
validation
state

Form with Local Storage

Premium

Build a form that saves data to localStorage and retrieves it on reload.

hard
react
forms
localStorage
state

Basic Counter with useState

Manage a simple counter using the `useState` hook.

easy
react
hooks
useState
state management

Clock with useEffect

Display and update the current time using the `useEffect` hook.

easy
react
hooks
useEffect
side effects

Theme Toggler

Toggle a light/dark theme using `useState`.

easy
react
hooks
useState
theme

Persist Counter State

Persist a counter state using `useState` and `localStorage`.

easy
react
hooks
useState
localStorage

Fetch Data with useEffect

Fetch and display data from an API using `useEffect`.

easy
react
hooks
useEffect
api

Debounced Input

Implement a debounced input field using `useEffect`.

easy
react
hooks
useEffect
debounce

Manage Focus with useRef

Manage focus on an input field using `useRef`.

easy
react
hooks
useRef
focus

Basic Timer

Build a timer using `useState` and `useEffect`.

easy
react
hooks
useState
useEffect

Form Validation with useState

Validate a form dynamically using `useState`.

easy
react
hooks
useState
validation

Responsive Navbar

Create a responsive navbar using `useState` and `useRef`.

easy
react
hooks
useState
useRef
navbar

To-Do List with useReducer

Premium

Manage a to-do list using `useReducer`.

medium
react
hooks
useReducer
state management

Modal with useContext

Premium

Build a modal with `useContext` for global state.

medium
react
hooks
useContext
state management

Optimize List with useMemo

Premium

Optimize list rendering with `useMemo`.

medium
react
hooks
useMemo
performance

Debounced API Call

Premium

Debounce an API call using `useCallback`.

medium
react
hooks
useCallback
api

Measure DOM with useLayoutEffect

Premium

Measure DOM elements using `useLayoutEffect`.

medium
react
hooks
useLayoutEffect
dom

Tabs Navigation with useReducer

Premium

Create a tab navigation system with `useReducer`.

hard
react
hooks
useReducer
tabs

Custom Fetch Hook with Pagination

Premium

Build a custom hook for fetching data with loading/error states and pagination.

hard
react
hooks
custom hooks
api
pagination

Expose Functions with useImperativeHandle

Premium

Use `useImperativeHandle` to expose functions from a child component.

hard
react
hooks
useImperativeHandle
refs

Form Handling Hook

Premium

Create a custom hook for form handling with validation.

hard
react
hooks
custom hooks
validation

Infinite Scrolling Hook

Premium

Build a custom hook for infinite scrolling.

hard
react
hooks
custom hooks
infinite scrolling