1.0.0 • Published 3 years ago

react-html-tag-attributes v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

npm version

react-html-tag-attributes

Simple React component that lets you insert attributes into the tag from basically anywhere. as long as it is mounted.

once the component is unmounted, the previous attributes are back.

Usage

  • Install.
yarn add react-html-tag-attributes
  • Require component.
import HtmlTags from 'react-html-tag-attributes';
  • Setup and render.
import React, { Component } from "react";
import HtmlTags from 'react-html-tag-attributes';

class App extends Component {
  render() {
    return (
      <div className="App">
          <HtmlTags itemtype="https://schema.org/FAQPage"/>
      </div>
    );
  }
}

export default App;

or typescript:

import * as React from 'react';
import HtmlTags from 'react-html-tag-attributes';


export class App extends React.Component<any, any> {
  render() {
    return (
        <div>
            <HtmlTags itemtype="https://schema.org/FAQPage"/>
        </div>
    );
  }
}