Candidate 1: 01/19/2018
what is JS closures ?
what is JS apply, call, bound?
what is React class component vs. function component
what is Redux middleware?
any experience using Redux state management?
what is event loop?
what is js callback?
what is promises?
what is ES6 fat arrow function
experience in ES6 and Typescript.
Candidate 2: 01/23/2018
what is JS closures ?
what is JS apply, call, bound?
what is React class component vs. function component
what is Redux middleware?
any experience using Redux state management?
what is event loop?
what is js callback?
what is promises?
what is ES6 fat arrow function
experience in ES6 and Typescript
Memory leaks? prevention?
containers vs presentation components?
life cycle methods in react?
state and props?
use of PropTypes?
Serverside rendering using redux
what is instance, element and component?
babel?
D3.js charts(expalined bar charts and stacked charts)
Experience with My Sql.
React test utilities(jest, karma, snapshot and enzyme)
what is virtual DOM? why is it useful?
Redux flow? any other state management tools experience?
experience with Node.js, Api calls
Candidate 3: 01/23/2018
- What is closure? Where will you use it and what are the disadvantages of closure?
- Difference between ES5 vs ES6? Difference and benefits of ES6?
A lot of benefits, it's all easier for developer to write JS code, for example,
- class, easier to do inheritance, no need to write prototype, can do inheritance using extends and call super in constructor
- spread operator, copy array, copy object
- arrow function, do not need function, this will be bound to the context where they defined, eg, no bind in ES6 class
- default value for function, do not need to use 'or' operator
- HOC, we can use HOC
How do you compare javascript objects?
Inheritance?
Spread operator?
Typescript? Have you used it with React?
Difference between Angular and React?
What is Redux and Flux? When do you use them?
Difference between an Element and a Component in React?
React.createElement(component, props, ...children) const element = React.createElement( 'div', {id: 'login-btn'}, 'Login' ) element will be just a plain JS object, part of the virtual Dom, it will be used on the diff algorithm to compare how the element is changed,
- Difference between React Components extend, createClass and mixins, HOCs?
extends vs createClass, below
mixins vs HOCs:
Mixin is used on the ES5 version react, so we can reuse some of the logic in mixins, but it brings a lot of dependencies, and when we want to refactor our code in the future, we have to take care of those mixins as well. And developer need to explicitly pass mixins to the component.
but HOC is like the decorators in ES5, it's using the composition pattern, which take a component in, and create a comp inside as a wrapper for the comp passed in, and return this newly created component. In this way, we have more abstraction instead of introducing more dependency to our component, so it's much easier for developer to use and it's easier to refactor. And developer do not need to care about the abstraction code, all they need to do is to call that HOC and pass the component in, eg: connect function in react-redux.
- Difference between React Components in ES5 and ES6?
s
class component, one is createClass, another is just ES6 class extends the react.Component
getInitialState to return initial state in ES5, ES6 we have this.state in constructor
getDefaultProps is a function return default props, in ES6 we use defaultProps which is a static property on class
ES5 function callbacks will bind 'this' automaticllu, ES6 we need to bind it ourselves or just define arrow fn
ES5 we can use Mixin, ES6 we cannot, we use HOCs
https://www.toptal.com/react/interview-questions
Difference between setState() and forceUpdate()?
What is pragmatic overview?
When would you use setState() and forceUpdate()?
Which feature can we use to cause a component to render only when its ID changes?