Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

react-ssml-dom

Package Overview
Dependencies
8
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "react-ssml-dom",
"version": "1.0.2",
"version": "1.0.3",
"description": "A proof of concept react host implementation for ssml strings",

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

@@ -8,4 +8,58 @@ <h1 align="center">

## 🌟 Quick Start
## ❓What is this?
Utilize the full power of React to develop voice UIs. ReactSSML provides a simple custom React renderer that let's you use React and JSX to create SSML output.
I wrote a small article about [my motivation](https://medium.com/@andre.timo.landgraf/a-react-renderer-for-ssml-91cdd1d66b3e).
This project is brand new, so if you run into issues or have questions, open up an issue and let me know! Any feedback is highly appreciated.
## 🚀 Installing ReactSSML
Get the package from [npm](https://www.npmjs.com/package/react-ssml-dom).
```bash
npm i react-ssml-dom
```
Create an App component
```javascript
import React from 'react';
const App = () => <s>Hello World</s>;
export default App;
```
Render your App
```javascript
import ReactSMML, { Document, Node } from 'react-ssml-dom';
// create a document similar to the DOM's document
const ssmlDocument = new Document();
// create a root node similar to the body in HTML
const root = new Node('speak');
ssmlDocument.body = root;
ReactSMML.render(<App />, root);
```
***Done!***
```javascript
console.log(ssmlDocument.toString())
```
```html
<speak>
<s>Hello World!</s>
</speak>
```
## 🌟 Next steps
***Clone this repo and play around with the demo application***
Get the source code

@@ -28,3 +82,3 @@

> react-ssml@1.0.0 start:demo /Users/anlandg/workspaces/react-ssml
> react-ssml@1.0.2 start:demo /react-ssml
> node dist/main.js

@@ -40,3 +94,3 @@

```bash
curl -X POST http://localhost:8080/api/login/
curl -X POST http://localhost:8888
```

@@ -43,0 +97,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc