Today’s React question doesn’t have much of a story…

Half a month ago, 248 Vue knowledge points were published, which attracted the attention of many friends, who strongly requested more interview questions before React. At your invitation, I found more than 20 React users, and they gave 328 questions for the interview. I sorted them out and sent them to you. React React React React React React React React React React React React

Front-end interviews daily 3+1 (today day 94)

  • “Front-end interview 3+1 every day”, learning without closing, charging and refueling only to meet a better yourself, 365 days without holidays, every morning at 5 o ‘clock purely manual release of interview questions (to beat yourself, happy everyone).
  • I hope you stay calm in this pompous front circle and spend 20 minutes a day studying and thinking.
  • In this ever-changing, class library emerging in endlessly front, we suggest that you do not wait to find a job, just brush the problem, advocate daily learning! (HTML, CSS, javascript are the cornerstone!)

Welcome to work with Jsliang to deal with the front end of the system. Currently, WE are working on LeetCode to get through both algorithms and data structures. Making the address

Super many questions warning start…

  • Topic Update Time
    • First time: 2019.07.19 -> 328 tracks

React | ReactNative | React-Router | Redux/Mobox | Flux

React

  • When to use the state manager?
  • What happens if the return in the render function does not use ()?
  • Can componentWillUpdate directly modify the value of state?
  • Tell me what you understand about React rendering
  • What rendering hijack?
  • React Intl how does React Intl work?
  • Do you use React Intl?
  • How to internationalize the React component?
  • So what are the properties of Context?
  • How do YOU develop components using Context?
  • Why does React not recommend using Context first?
  • Where else can you get Context directly other than by instance properties?
  • What is childContextTypes? What does it do?
  • So what is contextType? What does it do?
  • What happens when a Consumer can’t find a Provider?
  • Have you ever used a Consumer?
  • How do YOU use Context in React?
  • React15 and 16 do not support IE more than how much?
  • Tell me what you know about Windowing
  • What are the application scenarios of the React slot?
  • Have you ever used the React place-portals? How does it work?
  • What is the use of React’s strict mode?
  • How does React split code? What is the principle of unbundling?
  • What does the React component’s constructor do?
  • Is the React component’s constructor required?
  • Where do you catch errors in React?
  • How does React import SVG files?
  • Tell me what you understand about Relay
  • Do you use constants a lot in React?
  • React props is read-only.
  • Have you ever used a Formik library? Talk about its advantages and disadvantages
  • Have you used any React form libraries? Talk about their advantages and disadvantages
  • What is the default value of a component’s property if no value is passed?
  • Can YOU write React applications in TypeScript? How does it work?
  • super()andsuper(props)What’s the difference?
  • Have you ever used a Loadable component? What problems has it solved for us?
  • Do you use suspense components? What problems has it solved for us?
  • How do I import components dynamically?
  • How do I set default values for non-controlling components?
  • How to introduce other UI libraries such as Bootstrap in React
  • How do you pass events to child components?
  • How do I get server-side data using Hooks?
  • What are the principles for using Hooks?
  • Do you understand the principle of the Render method? What data type does it return?
  • What is the difference between useEffect and useEffect?
  • What animation packages did you use in the React project?
  • Does React have to use JSX?
  • Is Render optional when customizing components? Why is that?
  • Do I need to make keys globally unique?
  • How do I update a component periodically?
  • React packages different domain names for different environments.
  • How to reduce the size of js generated when using Webpack to package React projects?
  • How to use async/await in React?
  • How many times have you read the React source code? What have you learned? How do you read?
  • ForwardRef? What does it do?
  • Write an example of what is JSX’s inline conditional rendering
  • How do YOU pass parameters to events in React?
  • How are React events different from normal HTML events?
  • How do YOU prevent events from behaving by default in React?
  • Which feature of React do you like best (just name one)?
  • When is it convenient to use the arrow function in React?
  • What feature of React do you dislike the most (just name one)?
  • Tell us what you understand about React’s reconciliation algorithm
  • What is the difference between using PropTypes and Flow?
  • How do you conditionally render components?
  • How do I write comments in JSX?
  • Constructor and getInitialState differ?
  • React implement for loop in JSX
  • Why is it recommended to Fragment elements? What’s the short for it?
  • Have you ever used React.Fragment? What is it used for?
  • Did you encounter security issues in React? How to solve it?
  • How do YOU listen for state changes in React?
  • React What is a stateful component?
  • How do React V15 handle error boundaries?
  • React Fiber What problem is it designed to solve?
  • React why not just change the state? If you want to modify how to do?
  • What are the benefits of create-React-app?
  • What is the use of decorators in React?
  • Implement a loading component using HOC
  • How to animate scrolling with React?
  • Name what you think are React best practices
  • How do you divide the React component?
  • How to create an event in React
  • How do I update the state of a component?
  • How do I embed multiple components into a component?
  • React render {if else}?
  • React why do you need Hooks?
  • What problems do React Hooks help us solve?
  • React memo/forwardRef component: Children type incorrect
  • Have you used Antd in your projects? Talk about its advantages
  • How to remove sourcemap on production in React?
  • How to reference sass or less in React?
  • Do you want to manually clear listening events and timers added to DOM elements before component uninstallation? Why is that?
  • Why should the for in the tag be htmlFor?
  • What problem does the state manager solve? When to use the state Manager?
  • What is the essence of a state manager?
  • Do functional components have a life cycle? Why is that?
  • How to reference third-party plugins in React? JQuery for example
  • What are the types of React touch events?
  • Is there a way to solve the problem that the same component cannot be re-rendered during route switching?
  • What are the new features of Act16?
  • What React UI libraries have you used? What are their advantages and disadvantages?
  • <div onClick={handlerClick}> Click </div>and<div onClick={handlerClick(1)}> Click </div>What’s the difference?
  • How do I introduce images in React? Which way is better?
  • How do I use font ICONS in React?
  • How do React apps pack and distribute? What are its steps?
  • ES6 syntax ‘… What applications does React have?
  • How to encapsulate a React global public component?
  • What are the methods for updating components when their props change in React?
  • What is the principle of immutable?
  • Do you know anything about immutable? What does it do?
  • How to improve the rendering efficiency of components?
  • How to avoid unnecessary render in React?
  • When will render be triggered?
  • Write React dynamically changing class switching component styles
  • React: How to use the Class property of the virtual DOM?
  • Why do attributes use className instead of class?
  • What is the update mechanism of the React component?
  • How can attributes be overridden in JSX? What are the principles of coverage?
  • How to use custom properties in JSX?
  • How do I prevent HTML from being escaped?
  • React is used a lot. Do you know the core idea of React?
  • How do we do static type checking in React? What are the ways to do that?
  • What is the difference between component state and setState in React?
  • React how to skip re-rendering?
  • How does React tell when to re-render components?
  • What is an instance of React? Are there any instances of functional components?
  • How do I determine which component a click element belongs to in React?
  • What’s the difference between components and elements in React?
  • Must the first letter of the component name be capitalized when declaring components in React? Why is that?
  • What, for example, is the reverse inheritance of HOC?
  • React Devtools? What are its advantages and disadvantages?
  • What is an example of a high-level component (HOC) property broker?
  • React isMounted
  • What is the recommended way to name the React component? Why not use displayName?
  • What does the React displayName do?
  • React component naming convention
  • Tell me what you understand about the React project structure
  • What life cycles did Act16 deprecate? Why is that?
  • How to start production mode in React?
  • What does the getInitialState method in React do?
  • Do you know how React creatClass works?
  • What is the purpose of validation props in React?
  • Did you use getDefaultProps in React? What does it do?
  • Did you use propType in React? What does it do?
  • How to check props in React?
  • What are the differences between React. CreateClass and extends Component?
  • What are the advantages and disadvantages of HOC?
  • You don’t want to set a lot of properties to a component. What’s the solution?
  • How has the life cycle of Act16 changed since the previous release?
  • How to implement the React component memory? How does it work?
  • What are the ways to create React animations?
  • Why is it recommended not to overuse Refs?
  • What are the problems with using HOC in React? How to solve it?
  • When do I use HOC when USING React?
  • How does React Diff work?
  • React how to improve list rendering performance?
  • Components using ES6’s class definition no longer support mixins, so what can replace them?
  • Why does the virtual DOM improve performance?
  • React performance tuning in what lifecycle? What is the principle of its optimization?
  • What do you know about React performance optimizations?
  • How do you use styles in React?
  • What are the React methods for handling form input?
  • What is shallow rendering?
  • Did you do unit tests on React? If so, what tools were used? How did you do that?
  • What are composite events in React? What’s the use?
  • Use React to write a todo application
  • What are the reconciliation and commit versions of React16?
  • Do React functional components have a life cycle?
  • What’s the difference between useState and this.state?
  • What is useImperativeHandle?
  • What is a useReducer?
  • What is useRef?
  • What is useEffect?
  • An example is useState
  • What is useState? Why use useState?
  • Please describe what you understand about the new React feature Hooks? What are the application scenarios?
  • Say what you understand about Error Boundaries
  • Tell me what you understand about Fiber architecture
  • How do you understand React’s business components and technical components?
  • Why is it recommended that the first argument to setState be a callback instead of an object?
  • What is the difference between presentation components and container components?
  • What’s the difference between Mern and Yeoman scaffolding?
  • Have you used Yeoman scaffolding on your projects?
  • Have you used Mern scaffolding in any of your projects?
  • What does the shouldComponentUpdate method do?
  • How do I use innerHTML in React?
  • Did you write React middleware plugins?
  • What is the React middleware mechanism like? What does this mechanism do?
  • What third-party middleware did you use in React?
  • Do you build React projects manually without scaffolding?
  • What is Portal in React?
  • What are the life cycles caused by changing prop in React?
  • React Multiple setState calls
  • What are the life cycles that are updated when you call setState in React?
  • What does the second argument to setState in React do?
  • Is setState in React synchronous or asynchronous? Why does state not necessarily update synchronously?
  • What is the process of batch update of setState in React?
  • What’s the setState enforcement mechanism in React?
  • What are the ways to traverse in React? What’s the difference?
  • What do you think of the React render method
  • What is the difference between props. Children. Map and JS map? Why React first?
  • Did you use React strict mode?
  • What’s the difference between setState and replaceState in React?
  • What’s the downside of setState in React?
  • Have you used React fragments before? What is its application scenario?
  • What are the methods for sharing data between React components?
  • What is the React state boost? What are the usage scenarios?
  • Describe briefly what React projects have you worked on?
  • What is the purpose of calling super(props) in the constructor?
  • How did you learn React?
  • Do you upgrade React from the old version to the new version? Have you encountered any pits?
  • What versions of React have you used?
  • Did you use React server rendering? How did you do that?
  • What do React mixins do? What scenarios are applicable?
  • How do React get the corresponding DOM element of the component?
  • Describe how events are handled in React.
  • What is the difference between JSX and HTML?
  • What are the React writing specifications?
  • How does create-react-app create a new application?
  • What are some ways to use React?
  • Tell me what you understand about the context of reader
  • React-dom.js, react-dom.js, and babel.js are all referenced at the same time.
  • Do you know how Virtual DOM works?
  • Have you read the React source code? Just a brief description of how it works
  • How does React prevent component rendering?
  • How do React non-sibling components communicate?
  • How do React siblings communicate?
  • How do React non-parent and child components communicate?
  • How do React and Son components communicate?
  • What do React components communicate with each other?
  • What is the difference between a class component and a functional component?
  • React custom components have you written? Tell me what you’ve written?
  • What is the difference between the React component’s state and props?
  • How many ways does React build components? Can I write that down?
  • Why not use indexes as the only key in React traversals?
  • What does a key in React do?
  • Is there another way to React besides binding this to the constructor?
  • How do I retain data when a page is reloaded in React?
  • Describe the React event mechanism
  • How to create an event in React?
  • What are the scenarios for stateless components in React?
  • Describe the difference between stateless and stateful components in React.
  • Write a HOC component of React and explain your understanding of it
  • Can refs be accessed in Render in React? Why is that?
  • What does refs do in React? What are the application scenarios?
  • Describe your understanding of pure functions?
  • What is the difference between a controlled component and an uncontrolled component?
  • What are the non-controlling components in React?
  • What are controlled components in React?
  • In which lifecycle should network requests be initiated in React? Why is that?
  • What is the React lifecycle?
  • Say what you mean by “Everything is a component” in React
  • Do you use ES6 or ES5 syntax for React? What’s the difference?
  • Why can’t browsers directly JSX? How do you solve it?
  • What pits have you stepped in while using React? How did you fill the hole?
  • Why do you like React? What are its advantages and disadvantages?
  • How to fix the page not rendering when reference types change values in pureComponent?
  • What is the difference between createElement and cloneElement?
  • What is the difference between Element and Component in React?
  • What is the difference between component and pureComponent in React?
  • How is the React virtual DOM different from the Vue virtual DOM?
  • Do you think React is fast? What are its limitations?
  • What is your understanding of declarative programming?
  • How does React differ from Angular and Vue?
  • What company developed React?
  • What is React? What are its main features?
  • What do you know about React?
  • How does React change component state and how does it change state?
  • How do you manage state in React?
  • What are the different ways to declare a React component?

ReactNative

  • How to set environment variables in React Native?
  • Please describe the principle of Code Push.
  • React Native How to check your diary?
  • How to test React Native?
  • How to debug React Native?
  • React Native what’s the difference between React?
  • Have you worked on React Native projects?

React-Router

  • How does the react-router get history objects?
  • React-router How to obtain URL parameters?
  • What is the difference between push and replace in History mode?
  • How to configure redirection on the React-Router?
  • The React – the Router 4<Router>How many types of components are there?
  • React-router 3 and react-router 4 What good features have been added?
  • What is the implementation principle of react-Router?
  • What is the use of the React-router 4 switch?
  • How many routing modes do React-Router have?
  • How does react-Router 4 re-render the same component when the route changes?
  • The React to the Router<Link>The labels and<a>What’s the difference in labels?
  • What are the differences between React routes and common routes?
  • What are the advantages and disadvantages of React routing?
  • What is the React route?

Redux/Mobox

  • Do you know what Rxjs is? What does it do?
  • How do I initiate a network request in Redux?
  • How does Redux reset state?
  • How does Redux set the initial state?
  • Can the Context API replace Redux? Why is that?
  • Is it recommended to trigger actions in the Reducer? Why is that?
  • How does Redux add new middleware?
  • What is the essential difference between Redux-Saga and Redux-Thunk?
  • How did you model asynchronous solutions in React?
  • Do you know how Redux-Saga works?
  • Have you ever used the Redux-Saga middleware? What does it do?
  • What are the biggest differences between asynchronous and synchronous actions in Redux?
  • What’s the difference between Redux and Vuex?
  • What is the middleware of Redux? What Redux middleware have you used?
  • Talk about the implementation process of Redux
  • What is the design philosophy of Mobx?
  • What components are Redux made of?
  • What’s the difference between Mobx and Redux?
  • How did you choose between Redux and Mobx on the React project? Say what you understand
  • Did you use Mobx in React? What are its application scenarios?
  • What does Redux thunk do?
  • What is the difference between Redux’s data storage and local storage?
  • In Redux, what is reducer? What does it do?
  • How to define an action in Redux?
  • What is an action in Redux?
  • What is a store in Redux?
  • Why can Redux do partial rendering?
  • What are the pros and cons of Redux?
  • What is the difference between Redux and Flux?
  • Redux what are its three principles?
  • What is a single data source?
  • What is a Redux? What is your understanding of Redux? What are the application scenarios?

Flux

  • What is the flow of data to the state change triggered by clicking the button?
  • Describe Flux’s thinking
  • What is Flux? What is your understanding of Flux? What are the application scenarios?