New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

convert-text-to-react

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-text-to-react

プレーンテキストをReactに変換する

0.2.4
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

convert-text-to-react

Build Status

Usage

npm i convert-text-to-react
import * as ReactDOM from "react-dom/server";
import { convert, ExampleComponent } from "convert-text-to-react";

const rawText = "<ExampleComponent x={1} y={-20}>Result of multiplication:</ExampleComponent>";

const components = {
  ExampleComponent,
}

const result = convert(rawText, components);

console.log(ReactDOM.renderToStaticMarkup(result);
// <div class="my-component">Result of multiplication: -20</div>

Licence

MIT

Author

Himenon

Keywords

react

FAQs

Package last updated on 11 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts