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 - npm Package Compare versions

Comparing version

to
0.2.1

2

package.json
{
"name": "convert-text-to-react",
"version": "0.2.0",
"version": "0.2.1",
"description": "プレーンテキストをReactに変換する",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -13,7 +13,13 @@ # convert-text-to-react

import * as ReactDOM from "react-dom/server";
import { toJSX, convert } from "convert-text-to-react";
import { toJSX, convert, ExampleComponent } from "convert-text-to-react";
const inputText = "<CustomComponent x={1} y={-20}>Result of multiplication:</CustomComponent>";
const inputText = "<ExampleComponent x={1} y={-20}>Result of multiplication:</ExampleComponent>";
const components = {
ExampleComponent,
}
const jsxText = toJSX(inputText);
const value = convert(jsxText!);
const converter = createConverter(components);
const value = converter(jsxText!);

@@ -20,0 +26,0 @@ console.log(ReactDOM.renderToStaticMarkup(value);)

Sorry, the diff of this file is not supported yet