Skip to content

liangbairong/lucky-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lucky-web

lucky-web是个使用yoga的布局引擎和React,来绘制canvas的渲染框架,支持react 17以上的hook

Install

$ npm i lucky-web -S

使用

import React from 'react'; 
import {render, View, ScrollView} from 'lucky-web';

const style = {
    main: {
        flex: 1,
        width: '100%',
        backgroundColor: 'rgba(49, 24, 124, 1)'
    },
}
const App = () => {
    return (
        <ScrollView style={style.main}> 
            <Text>HELLO WORLD </Text>
        </ScrollView >
)
}
const app = render(<App />, document.getElementById('app')!, {});
<div id='app'></div>