frontend-challenges icon indicating copy to clipboard operation
frontend-challenges copied to clipboard

FrontendChallenges is a collection of frontend interview questions and answers. It is designed to help you prepare for frontend interviews. It's free and open source.

Results 109 frontend-challenges issues
Sort by recently updated
recently updated
newest added

styles.css ```css styles.css body { font-family: sans-serif; } h1 { font-size: 1.5rem; } span[aria-disabled="true"] { pointer-events: none; opacity: 0.5; } ``` App.tsx ```tsx App.tsx import React, { useState, useRef }...

answer
434
react-ts

App.tsx ```tsx App.tsx import React, { useState, useRef } from "react"; import { Stepper, StepperRef } from "./Stepper"; const App = () => { const steps = ["Login", "Shipping", "Payment",...

answer
434

## Info ```yaml difficulty: medium title: clearAllTimeout type: question template: javascript tags: javascript, timers ``` ## Question In JavaScript, `clearTimeout` is used to cancel a **single** timeout. Your task is...

new-challenge

useReducer.js ```js useReducer.js import { useState } from "react"; export function useReducer(reducer, initialState) { const [state, setState] = useState(initialState); const dispatch = (action) => { setState(() => reducer(state, action)); };...

answer
react
385

App.jsx ```jsx App.jsx import { useState, useEffect } from "react"; const PAGE_SIZE = 5; export default function App() { const [page, setPage] = useState(1); const [storyIDs, setStoryIDs] = useState([]); const...

answer
react
380

App.jsx ```jsx App.jsx import { useEffect, useState } from 'react'; const Input = ({ onChange, label, placeholder, id }) => { useEffect(() => { console.log(`Input mounted`); }, []); return (...

answer
react
366

App.jsx ```jsx App.jsx import { useState } from 'react'; const ComponentWithState = () => { const [isActive, setIsActive] = useState(false); return ( setIsActive(!isActive)}>click to highlight ); }; export default function...

answer
react
364

App.jsx ```jsx App.jsx import { useState } from "react"; export default function App() { const [isCompany, setIsCompany] = useState(false); return ( e.target.checked ? setIsCompany(true) : setIsCompany(false) } /> Is Comapny?...

answer
react
360

App.jsx ```jsx App.jsx import { useState } from "react"; export default function App() { const [isCompany, setIsCompany] = useState(false); return ( e.target.checked ? setIsCompany(true) : setIsCompany(false) } /> Is Comapny?...

answer
react
360