react-node-to-string
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

react-node-to-string

Extract string from React node.

This project was developed to extract string from React.ReactNode object.

Installation

$ npm install react-node-to-string --save

Usage

import { ReactNode } from "react"
import reactNodeToString from "react-node-to-string"

const node: ReactNode = (
  <p>
    <strong>lorem</strong>ipsum
  </p>
)

console.log(reactNodeToString(node))

// loremipsum

Licence

MIT

/react-node-to-string/

    Package Sidebar

    Install

    npm i react-node-to-string

    Weekly Downloads

    3,733

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    3.63 kB

    Total Files

    5

    Last publish

    Collaborators

    • sunknudsen