react-tea
v0.0.1
Published
A custom React renderer for integrating React components with Bubble Tea for terminal-based UIs.
Downloads
64
Maintainers
Readme
React Tea
A custom React renderer for integrating React components with Bubble Tea for terminal-based UIs.
Installation
npm install react-tea
Development
Create an
app.js
file with your React component tree, for example:const React = require('react'); const { render, Text, View, Button, createStyle } = require('react-tea'); const textStyle = createStyle({ color: 'green', bold: true }); const viewStyle = createStyle({ backgroundColor: 'black' }); const App = () => ( <View style={viewStyle}> <Text style={textStyle}>Hello, React Tea!</Text> <Button onClick={() => console.log('Button clicked')}>Click Me</Button> </View> ); render(<App />, {});
Start the development server:
npm run dev
This will run both the backend and frontend.
Building the Application
To create a bundled executable for distribution, run:
npm run build
The compiled binaries will be available in the dist
directory.
Running the Backend
If you prefer to run the backend directly, use:
node scripts/run-backend.js