JSPM

  • Created
  • Published
  • Downloads 216
  • Score
    100M100P100Q101473F
  • License MIT

Package Exports

  • @corex/use-typed

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@corex/use-typed) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


name: use-typed route: /corex/use-typed

Example Usage

Edit trusting-hypatia-frr0z

import React from 'react'
import useTyped from '@corex/use-typed'

export const Hello = () => {
  const typedRef = React.useRef(null)

  useTyped(typedRef, {
    strings: ['example', 'something else', 'another'],
    typeSpeed: 50,
    backSpeed: 30,
    loop: true,
    showCursor: false
  })

  return (
    <h2>
      Hello, <span style={{ color: 'dodgerblue' }} className='text-success' ref={typedRef} /> text
    </h2>
  )
}

export default Hello