React JS:
Remove duplicate characters in array of elements
var sandwiches = ['turkey', 'ham', 'turkey', 'tuna', 'pb&j', 'ham', 'turkey', 'tuna'];
var deduped = Array.from(new Set(sandwiches));
// Logs ["turkey", "ham", "tuna", "pb&j"]
console.log(deduped);
- given word last letter should be capital.
- Cloure function
Closures are inner functions that have access to the outer function’s variables and parameters. Even after the outer function’s execution is finished, the inner functions have access to the variables in the outer function. Closures are everywhere in JavaScript and you’ve probably been using it even if you have not realised it yet.
- diff class component, functional component
Functional Components | Class Components |
A functional component is just a plain JavaScript function that accepts props as an argument and returns a React element. | A class component requires you to extend from React. Component and create a render function which returns a React element. |
There is no render method used in functional components. | It must have the render() method returning HTML |
Also known as Stateless components as they simply accept data and display them in some form, that they are mainly responsible for rendering UI. | Also known as Stateful components because they implement logic and state. |
React lifecycle methods (for example, componentDidMount) cannot be used in functional components. | React lifecycle methods can be used inside class components (for example, componentDidMount). |
- Error Handling in React.
- how to give generic exception and display the message
- error boundaris
- what is call back hell function
- what is non blocking io---asyncronous call
- what is stright mode
- Differenec Virtual dom and Real dom.
- react life cycle
- what is promise unchining,promise.all-- promise is asyncronous call
- diff let,var,const
- what is closur function,nested function
- basic ES6 features- let and var,promise,iterator
- How to deploy React application
- React Router types how it works,nested routes
- What is Arrow function,uses
- spread operator
- what is generator
- what is hooks- use memo,use context,use effect
- How redux works
- diff element and component
- how to prevent rerendering-- using pure componentd or use memo
- React application performence.
- synthatic events.
- what is controlled components
- how to set initial state in Redux
- Store in Redux
- How many types are Reducers
- what is Data binding
- What is context API