![]() ![]() If you use React with Web Components (which is uncommon), use the class attribute instead. This applies to all regular DOM and SVG elements like, , and others. To specify a CSS class, use the className attribute. defaultChecked is the uncontrolled equivalent, which sets whether the component is checked when it is first mounted. This is useful for building controlled components. You can use it to set whether the component is checked. The checked attribute is supported by components of type checkbox or radio. There are a number of attributes that work differently between React and HTML: checked For example, you can keep aria-label as aria-label. The exception is aria-* and data-* attributes, which should be lowercased. For example, the HTML attribute tabindex corresponds to the attribute tabIndex in React. In React, all DOM properties and attributes (including event handlers) should be camelCased. We took the opportunity to clean up a few rough edges in browser DOM implementations. React implements a browser-independent DOM system for performance and cross-browser compatibility. These new documentation pages teach modern React and include live examples: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |