snippet
Add Custom HTML Attributes in JSX for your React application
From React 16, we can add custom attributes natively into JSX. This exemple add simple attribute data custom directly in the JSX syntaxe
render() {
return (
<div data-custom="true" />
);
}
Related snippets |
---|