A library convert to anchor tag from text children as react component.
npm install react-tiny-linkify> A library convert to anchor tag from text children as react component.
- very tiny
- simple usage
- so simple
- - -
```
$ npm i react-tiny-linkify
`jsx
import React from 'react'
import linkify from 'react-tiny-linkify'
const Example: React.FC<{ children: string }> = ({ children }) => (
{linkify(children)}
const element = (
example: https://example.com
)
/*
* got: ReactElement
*
* example: https://example.com
*
- with memo
`jsx
const Example: React.FC<{ content: string }> = ({ content }) => {
const linked = useMemo(() => linkify(content), [content])
return (
{linked}
)
}
``