Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@mainframe/bot-ui
Advanced tools
This documentation only covers the JavaScript UI framework, see the [Mainframe bots documentation](http://developer.mainframe.com/) for more information about creating Mainframe bots, and the [bots SDK repository](https://github.com/thusfresh/bot-sdk-js)
This documentation only covers the JavaScript UI framework, see the Mainframe bots documentation for more information about creating Mainframe bots, and the bots SDK repository to get started implementing a bot in JavaScript.
npm install @mainframe/bot-ui # npm
yarn add @mainframe/bot-ui # Yarn
const React = require('react')
const { render, Text } = require('@mainframe/bot-ui')
const ui = render(<Text>Hello bot!</Text>)
This UI framework is meant as a complement to the JavaScript bot SDK, exposing the components supported by the client UI and a render()
function converting a JSX tree to an UIComponent tree expected by the Mainframe server.
The render()
function expects a React.Element
, the provided JSX must therefore be transpiled, for example using Babel's React JSX transform plugin.
Alias to React library. It needs to be imported in scope when using Babel's React JSX transform plugin so that JSX can be converted to React.createElement()
calls.
Alias to React JSON renderer convertToObject function. Converts the JSX tree into a JS Object supported by the Mainframe platform.
All the documented components are exposed by this UI framework so they can be used to create the JSX tree.
MIT
See LICENSE file
FAQs
This package has been deprecated
The npm package @mainframe/bot-ui receives a total of 0 weekly downloads. As such, @mainframe/bot-ui popularity was classified as not popular.
We found that @mainframe/bot-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.