react-use-hyphen
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

react-use-hyphen

npm install react-use-hyphen

How to use it

Using the component:

import React from 'react';
import ReactDOM from 'react-dom';
import useHyphen from 'react-use-hyphen';
 
import './styles.css';
 
function App() {
  const { Hyphen } = useHyphen();
 
  return (
    <div className="App">
      <div>
        <Hyphen>
          It real sent your at. Amounted all shy set why followed declared.
          Repeated of endeavor mr position kindness offering ignorant so up.
          Simplicity are melancholy preference considered saw companions.
        </Hyphen>
      </div>
    </div>
  );
}
 
const rootElement = document.getElementById('root');
ReactDOM.render(<App />, rootElement);

Using the hyphenated function:

import React from 'react';
import ReactDOM from 'react-dom';
import useHyphen from 'react-use-hyphen';
 
import './styles.css';
 
function App() {
  const { h } = useHyphen();
 
  return (
    <div className="App">
      <div>
        {h('It real sent your at. Amounted all shy set why followed declared.')}
      </div>
    </div>
  );
}
 
const rootElement = document.getElementById('root');
ReactDOM.render(<App />, rootElement);

Package Sidebar

Install

npm i react-use-hyphen

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

26.3 kB

Total Files

12

Last publish

Collaborators

  • dvaji