Front-end comprehensive interview questions (second period)

1. Will the position of the script affect the first screen display?
Does not affect the start time, but affects the end time

2. What is the difference between disiplay and visibility?
The difference between v-if and v-show is the same. The former does not meet the conditions and directly removes the node, which affects the page layout; the latter does not meet the conditions and hides the style through the Css method, the node still exists and does not affect the layout. "The case is here"

3. What is the order of browser rendering?
Build dom tree, build css tree, build render tree, node layout, page display

4. What is the difference between watch and computed?
1) Watch is not cached, computed, has cache
2) Watch monitors data changes, computes new values ​​from existing data
3) Watch cannot be computed asynchronously, can be asynchronous
4)

Watch one-to-many relationship computed many-to-one relationship 5. React mix how do you Understand? Mixins
extract the common logic and data of multiple components.

6. Why do we need to re-encapsulate axios?
Unified configuration of http request, address, and request header;
http request can be hijacked, and unified handling of errors in response;
extended and simplified axios method, jsonp, address.

7. Briefly describe the principle of webpack packaging.
Webpack is actually a static module packaging tool. When webpack processes the project,
it will recursively build a dependency graph that contains everything the application needs.
Modules, and then package all these modules into one or more bundles.

  I am a front-end noob who is working hard. Apart from working hard during the day, I also need to study myself at night. Everyone who has a little achievement has read it with Yingxue. Follow me! Work hard with me

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45820444/article/details/108869306