
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@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 1 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.