Skip to content

A JavaScript library that allows you to write React components using TypeScript code and compile it to C code

License

Notifications You must be signed in to change notification settings

lcui-dev/react

Repository files navigation

@lcui/react

(中文/English)

A React library for LCUI application development, providing TypeScript type declarations and React version preset components that need to be used in conjunction with @lcui/cli.

Installation

npm install -D @lcui/react react @types/react

Usage

import{Text,TextInput}from'@lcui/react';importstylesfrom'./app.module.css';exportdefaultfunctionApp(){return(<divclassName={styles.app}><Text>Hello, World!</Text><TextInputplaceholder="Please input..."/><div> ); }

LCUI is not a browser engine, and functions such as text display and input need to be implemented by specific components. Therefore, there may be the following differences in JSX writing:

 <div className={styles.app}> - Hello, World!+ <Text>Hello, World!</Text>- <input placeholder="Please input..." />+ <TextInput placeholder="Please input..." /> <div>

License

MIT

About

A JavaScript library that allows you to write React components using TypeScript code and compile it to C code

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published