Sobes.tech

Tell us about the Event Loop in JavaScript/browser.

259

Tell me about the position property in CSS. What values does it have?

216

Which CSS selectors are the most expensive for the browser?

186

Tell about this in different contexts: in object methods, in arrow functions, and in regular functions.

171

What is CORS and what is it used for?

165

Tell me about CSS selector specificity. How is it calculated? What is the most specific selector?

152

import { useState } from "react"; const usePreviousValue = (value: number) => {}; export default function App() { const [count, setCount] = useState(0); const previous = usePreviousValue(count); return ( <div className="App"> <h1>Current Value: {count}</h1> <h2>Previous: {previous ?? "-"}</h2> <button onClick={() => setCount((prev) => prev + 1)}>Click</button> </div> ); }

150

Tell me about state management: which libraries have you used, and tell me about the Redux architecture.

149

How to synchronize two browser tabs using localStorage? Talk about the storage event.

146

Tell me about ways to preserve context in JavaScript: bind, call, apply. How do they differ?

140

Tell me about the React component lifecycle and hooks (useEffect, useState, useRef, useCallback, useMemo, useLayoutEffect, etc.)

138

What types are in TypeScript that are not in JavaScript? Tell about utility types.

136

Tell me about the critical stages of browser rendering (Critical Rendering Path)

133

What is the difference between the nullish coalescing operator (??) and the logical OR (||)?

133

Tell about the pattern of lifting state up in React.

133

function debounce(callback, delay) {}

131

/** * Type a function that takes an array of objects and a key, * returns an array of objects where this key/property exists **/ const filterArrayByKey = (items, key) => { return items.filter((item) => item[key] !== undefined && item[key] !== null); };

127

Tell about the defer and async attributes in the script tag. How do they differ?

112

What is the difference between simple and complex (preflight) requests in the context of CORS?

91