Goldman

Sachs

Phone

Interview

Questions

:

Redux store vs React's state:

use store if the satete is persistent, and matters globally or is mutated in complex way, use React's state if the state is ephemeral that does not matter globally, such as the state for an input or animation.

Set 1:

 1\) How to pass values from a fourth-level child element to a parent element.

 2\) How to handle data flow

in

REACT.

 3\) How to optimize when using CSS.

 4\) How to move a box within a box \(I'm presuming this is a box-model he was talking about\).

 5\) How to interact with a button using ANGULAR.

______________________________

______________________________

_______

Set 2:

OOJS

Can you explain inheritance

in

JavaScript?


If i have a function to create a class eg "Car" and I print out Car.prototype in the console - what will print out?

an object with a constructor property


How can you extend a class using protoype?

React

What is the difference between state and props?


If I want to find out what the props are before the component mounts how would i do it?

componentWillMount(), to handle configuration, update our state, and in general prepare for the first render.

At this point, props and initial state are defined. We can safely querythis.propsandthis.state


If i dont want a component to render based on its state or props how would i do it? shouldComponentUpdate

If I want a child to update the state of its parent how would i do it?

Git

If i have a local brach and changes have been made on the remote - how can I pull those changes into my local?

( i think the answer was 'git pull --rebase' )

ES6

Explain what it is.

Are you familiar with the keyword 'yield' ?

Are you familiar with generators?

Other

Have you used build tools ( like Webpack ). Explain what that is

What are npm scripts?

______________________________

______________________________

_______________

Set 3:

compare the different react component lifecycle methods?

How to create Higher order components in react?

What are pure functional components?

how might react handle or restrict props or require certain props to exist? PropTypes

different between standard JS Router and react router

how to use forms and events

in

react.

what is reactjs-JSX?

explain step by step approach on how to setup environment for reactjs.

______________________________

______________________________

_____________

Set 4:

React JS with ES6

ES6 Concept

Difference between ES5/ES6

a lot of difference, like different variable decleration keyword, different class initiation, different asynchronous operation, new features, new data types

ES6 - Generators

Redux

Redux Saga

_________________________________________________________________________

Set 5:

What are some engineering challenges you've had to overcome in your previous roles?

What testing libraries do you use with React?

What other front-end frameworks besides React and Angular would you like to learn or use in the future?

Angular 4 and Vue.

In what React lifecycle method would you NOT want to call set state?

shouldComponentUpdate, componentWillUpdate, render

What are any shortcomings that you would change in the Redux library?

The one thing I could think about is you know, the redux does not tells you which which state should go into store, and which state should handled by yourself, and redux only allows you one store, but if you have a very large application, such as the Chase Online Banking, we have paybills, quickpay, profile, investing page, every page is a very big application, if you manage their state all in one store, that will be inefficient.

What are some pros/cons in React vs Angular?

React is only the UI layer, so you could compose other layer by yourself, you have a lot of options, but Angular is like one solution, it's a big framework that have everything you need. Because of this, the size of React is very small. And react has Virtual Dom, so it will be more efficient for a large applciation, and angular's two-way data-binding is not efficient.

What dev tools do you use in debugging your code?

We use the browser to set breakpoint to debug, and we also use the redux-devtool, because it's easy to see all the actions you did, and show how your state is changed

How can you safe guard against certain props being passed into a child component?

We use PropTypes to define the props passed in is the correct type.

How can you make sure certain props are passed into a child component?

We use PropTypes to define the props passed in is the correct type.

When would you use pure functional components versus class components in React?

As long as your component does not need to maintain it's own state, and it deos not have any lifecycle methods, we will let it be stateless, and it's only used for presentation, so it can be reused. And for class component, we usually used it as data source, because we need to fetch data in the componentDidMount method, and it's the container for children cocmpoennts.

How would you handle asynchronous operations in React?

We use axios,

What do you think will be the most important language in computer science in 5 years?

JS, because JS is so powerful nowdays, it can run on the front-end and backend, you know the npm is the largest package registry in the world, and and with the helper of a lot of very good library, such as the react, we could even use JS to develop the native app. And JS will also go others territors, such as the IOT, the big data, and also BlockChain, there is a CryptoCurrency that aims to use JS to do bl

Are there any special architectural layouts you use or would like to implement for files in a React-Redux application?

for a small app, we can just use components, containers, store, in store we will have actions and reducers, but for a very large applciation, using this way will results very big folder, so I would say we can seperate every page into single folder, in every folder, will have sub folders for all the stuff.

results matching ""

    No results matching ""