react-html-tag-attributes
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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>
    );
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i react-html-tag-attributes

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

8 kB

Total Files

6

Last publish

Collaborators

  • vasilevich