TECHWATCH
#all#csseffect#css#video#resource#javascript#snippet#reactnative#cicd#tutorial#db#nodejs#reactjs#redux#ui#nextjs#library#howto#learn#typescript#ux#solution#html#testing
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
Adding default prop on your component
Call external function javascript from React component
Fetch data when React component props changes
Clear and reset all inputs on form with React.js
How to get history on react-router v5 project
Set body styles with React on componentDidMount
Updating state not when Using React state Hook without setInterval function
How to create new project React with create-react-app
How to use condition on JSX
Use className with React.js
Render simple component with React.js
How to add comment in React on JSX

289 links

77 snippets

Feedback

You have feature idea, feedback or suggestion for new tag click here and submit form

Footer

Twitter

© 2021 Techwatch. All rights reserved.