Skip to content

Nsir15/react-native-nativeModuleExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

使用方式:

npm install react-native-nxnativemodule-example --save

rnpm link

然后在需要调用的JS 文件中:

import { LineChart, BarChart } from 'react-native-nxnativemodule-example'; 导入组件

就可以正常使用:

栗子🌰:

class NativeModuleTest extends Component {
  render() {
    return (
      <View>
          <BarChart style = {{width:200,height:200}}
          xLabel = {['102','70','40','90']}
          barData= {['102','70','40','90']}
          barChartFrame= {[0,10,200,200]} />
        
          <LineChart style={{width:400,height:400}}
            lineValues = {['2','7','4']}
            xLabel = {['2','7','4']}
            LineChartFrame = {[0,0,350,200]}/>
      </View>
        );
  }
}


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published