
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Use React and CSS to build UI interfaces on canvas
Document | 中文文档 | Live DEMO | DEMO Code
$ pnpm add revas react@19
import React from 'react'
import {render, View, Text} from 'revas'
render(
<View style={{ flex: 1 }}>
<Text style={{ fontSize: 20 }}>Revas</Text>
</View>,
document.getElementById('container')
)
import React from 'react'
import {render, View, Text} from 'revas'
export class Widget extends React.Component {
componentDidMount() {
this.app = render(
<View style={{ flex: 1 }}>
<Text style={{ fontSize: 20 }}>Revas</Text>
</View>,
document.getElementById('container'),
this
)
}
componentDidUpdate() {
this.app.update()
}
componentWillUnmount() {
this.app.unmount()
}
render() {
return <div id="container" />
}
}
Revas 2.0 is a major upgrade with breaking changes:
| Change | v1.x | v2.x |
|---|---|---|
| React version | React 17.x | React 19.x (required) |
| Layout engine | yoga-layout-wasm (async) | yoga-layout 3.x (sync) |
| Module format | CJS + ESM | ESM-first with CJS fallback |
Upgrade React to version 19.x:
pnpm add react@19 react-dom@19
Update imports (if using /common export):
// No changes needed - API is the same
import { View, Text } from 'revas'
import { View, Text } from 'revas/common'
The layout engine has been upgraded from yoga-layout-wasm to yoga-layout 3.x:
Supported Flexbox properties (unchanged):
flex, flexDirection, justifyContent, alignItems, alignSelf, flexWrapwidth, height, minWidth, maxWidth, minHeight, maxHeightpadding, margin, borderWidthposition (relative, absolute, static), top, left, right, bottomFor full style reference, see style.ts.
If you're using Revas on custom platforms (WeChat mini-games, ByteDance games), the revas/common export now uses synchronous yoga-layout. Remove any async initialization code:
// v1.x (old)
import { initYoga } from 'revas/common'
await initYoga() // ❌ No longer needed
// v2.x (new)
import { render } from 'revas/common'
render(...) // ✅ Works immediately
FAQs
Build Apps on Canvas, with React and Flexible CSS, inspired by react-canvas
The npm package revas receives a total of 6 weekly downloads. As such, revas popularity was classified as not popular.
We found that revas demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.