http://jasonwatmore.com/post/2017/03/14/react-pagination-example-with-logic-like-google

https://www.codereviewvideos.com/course/pagination-filtering-and-sorting/video/react-pagination-part-1

https://github.com/Silence11/reactPagination/blob/master/src/components/pagination.jsx

Candidate 1:

  1. what's smart component and dumb component

  2. what's redux flow

  3. what are the middleware you using for redux

  4. what have you been using for css preprocessor

  5. unit test for React

  6. where do you keep your biz logic? why

  7. life cycle for react

  8. what the most challenge question you handled in your dev work?

the f2f interview will be consist from 3 parts:

  1. js code based on given wireframe(redline)

  2. unit test

  3. css

Candidate 2:

  1. Which feature can we use to cause a component to render only when its ID changes?

  2. How might React handle or restrict Props to certain types, or require certain Props to exist?

3. Compare and contrast setState() and forceUpdate(). What is the significance of each, and when would you use one or the other?

forceUpdate will bypass SCU, so when your render have some data that does not depend on the state or the props, you can use forceUpdate to update the view, for example, in our view your are replying on a random number, and this number is coming from Math.random, which does not saved on the sate or props, so in this scenario, you can use forceUpdate to re-render.

  1. How might you use any data layer with React? What are the systemic requirements of doing so?

  2. How would you create Higher Order Components (HOCs) in React?

a function takes a component as params, and inside the function you create a new component that wrap the component you passed in, and return this new component. So you can do a lot of fancy sork on this new component, you can require some data and pass the data to your component, you can reuse some logic to the

we use HOC to make our code dry, do not repeat yourself, to wrap some reusable code,

6. Difference between ES5 and ES6 pertaining to React? Advantages of each?

  1. require ---> import
  2. React.createClass() ---> ES6 class

  3. getInitialState ---> this.state in constructor

  4. eventHandler //'this' auto bind in ES5 because we define it in createClass,

  5. You need to define the static method inside the createClass, in ES6 you can define it our side class, such as Class.propTypes, Class.childContextTypes

advantage ES5: you have better control of your code, since ES6 will be transpiled to ES5 anyway

advantage ES6: better code format

  1. own module system 'import' , you do not need other library to do it
  2. class, writing class with extend is more clear than using createClass in ES5
  3. U do not need to update ur code once all the browoser support ES6 in the future
  1. React Life Cycle?

  2. Async Calls in React?

axios, thunk, saga

Candidate 3:

1) Lambda functions (arrow) - this

2) es6 vs es5 features

3) project work flow

4) pure functions - setState - immutable

5) smart vs dumb component

6) redux flow

6) flow of execution(heap, queue, stack flow)

7) closures

8) webpack

9) middleware (saga) - async

results matching ""

    No results matching ""