Sobes.tech

Tell about memoization in React: useMemo, useCallback, React.memo. When to use them?

Middle+
274

const X = { a: 1, b: 2, c: 3, d: 4 } function getProperty<T>(obj: T, key: keyof T) { // Type the function return obj[key] } getProperty(X, 'a') // no error getProperty(X, 'e') // error: key 'e' is not a key of object X getProperty({ name: 'Sergey' }, 'name') // no error getProperty(1, 1) // Error. First argument must be an object (not a function or primitive)

Middle+
252

Why did you use JSON.stringify? Could you have used a Map instead of an object for caching?

Middle+
251

Tell about your experience in your own words, what you would like to highlight, interesting technical moments from your resume.

Middle+
246

const { foo: [bar], bar: [{ baz: foo }] } = { foo: [1], bar: [{ baz: 3 }] } console.log(bar) // 1 console.log(foo) // 3

Middle+
217

Please tell me, what is the difference between Map and object?

Middle+
214

What is scope of visibility? What are the scopes of variables?

Middle+
202

const submit = (el) => () => { log(el); } arr.map(el => <button onClick={submit(el)}/>) arr.map(el => <SomeComp key={} pmclick={() => submit(el)} />) const param = useMemo(() => ([c: a + b]), [a,b]) return <Child value={param} /> Child = React.memo(() => {})

Middle+
199

Where can we store state on the client side? Tell about them.

Middle+
196

What is the difference between a function expression and a function declaration?

Middle+
196

How often have you worked with the context (this) in JavaScript? Explain the loss of context and ways to solve it (bind, call, apply, arrow functions, saving in a variable).

Middle+
195

Tell about data storage: cookies, localStorage, sessionStorage. How was authorization with tokens implemented in your project?

Middle+
194

let a = 2 function foo() { console.log(a) } function bar() { let a = 1 foo() } bar() //

Middle+
192

Tell me about Promise: statuses, static methods (all, allSettled, any, race).

Middle+
191

Are you familiar with tools like Confluence, Jenkins, and internal services (EFS, RMC)?

Middle+
190

If a Promise is not resolved but rejected, where can we catch the error? What else besides then and catch exists? When does finally execute?

Middle+
188

const X = { a: 1, b: 2, c: 3, d: 4 } function getProperty(obj, key) { // Type the function return obj[key] } getProperty(X, 'a') // no error getProperty(X, 'r') // error, key r is not a key for object X getProperty({ name: 'Sergey' }, 'name') // no error

Middle+
186

Tell about your role in the team: were you a leader, a right-hand man, did you have experience making independent decisions? How were roles delegated?

Middle+
182

What does the 'in' operator do in TypeScript?

Middle+
177

Does the Event Loop work the same in Node.js and in the browser?

Middle+
176
/5