react-tea

0.0.1 • Public • Published

React Tea

A custom React renderer for integrating React components with Bubble Tea for terminal-based UIs.

Installation

npm install react-tea

Development

  1. 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 />, {});
  2. 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

/react-tea/

    Package Sidebar

    Install

    npm i react-tea

    Weekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    15.9 kB

    Total Files

    9

    Last publish

    Collaborators

    • mchateloin