React functional components use Ref React functional components use ref In React, ref can help us get instances of subcomponents or DOM objects UseRef const inputRef = useRef(init); useRef returns a mutable ref object whose .current property is initialized to the passed parameter (init). The returned ref object remains unchanged throughout its lifetime. Let’s see […]
Tag: components
[springboot] Springboot annotation configuration class add components
Article directory foreword First, the configuration class of springboot 2. @Bean annotation 1. Use @Bean annotation 2. Properties of @Bean 3. Singleton of @Bean 3. @Configuration attribute 3. Use spring commonly used annotations 1. @SpringBootApplication annotation on the startup class 2. @SpringBootApplication annotation attribute 4. Use @Import to add components 5. Use @ImportResource to import […]
5. Find any component instance – findComponents series method
Overview In the previous section, we have introduced two methods of communication between components: provide / inject and dispatch / broadcast. They have their own usage scenarios and limitations. For example, the former is mostly used for child components to obtain the state of the parent component, and the latter is often used for communication […]
The DOM of the three major components of JavaScript
Directory 1. Basic introduction to DOM 1. Basic concepts 2. Composition of DOM 3. DOM tree (family tree) 4. Find elements of the HTML DOM 5. Changing HTML elements 2. DOM node operation 1. Basic introduction 2. Node level 3. Node operation 4. Form object 3. Case 1. Carousel 2. tab 1. Basic introduction to […]
Ten. More flexible components: Render function and Functional Render
The biggest difference between Vue.js 2.x and Vue.js 1.x is that 2.x uses Virtual DOM (virtual DOM) to update DOM nodes and improve rendering performance. Generally speaking, when we write Vue.js components, templates are written in , but it is not the final content. Template is just a developer-friendly syntax that can You can see […]
react slots and HOC higher order components
react component slot Way of writing: <Table>Content</Table> //The react slot is in the content position of the custom component. This is done using slots: Encapsulating Simple Components: Using Slots in the Content Area <Tab num={11} content=”Data to be charged (pieces)”> <i className=”iconfont iconfont-xingqudingxiang”></i> </Tab> Use of slots: Slot content defaults to the props attribute. The […]
Manually build a cluster based on the original HADOOP components
HadoopClusterPlanning Before building a cluster, you need to do some preparatory planning in advance, including host planning, software planning, user planning, and directory planning. Before building the cluster, create an account and configure password-free login. Due to the enablement of the firewall, the firewall ports corresponding to each node need to be added and opened. […]
Exception handling components in SpringBoot
Summary of Java knowledge points: If you want to see it, you can enter it from here Table of Contents 1.8. Automatic exception handling 1.8.1. Response rules 1.8.2, error controller 1.8.3. View resolver 1.8.4, error attribute processing 1.8, automatic exception handling Spring Boot provides automatic configuration for exception handling through the configuration class ErrorMvcAutoConfiguration, which […]
6. Combination of multi-selection box components – CheckboxGroup and Checkbox
In Section 5, we have completed the component Form with data validation function, and this section continues to develop a new component – the combined multi-selection box Checkbox. As a basic component, it can also be integrated in Form and apply its validation rules. Checkbox component overview The multi-select box component is also composed of […]
Flutter components–basic use of Slivers
We consider a layout like this: a sliding view includes a header view (HeaderView), a list view (ListView), and a grid view (GridView). How can we make them achieve a unified sliding effect? It’s hard to do using the front scroll. There is a Widget in Flutter that can accomplish such a scrolling effect: CustomScrollView, […]