0
我是react-native的新手。 我在读文件:https://facebook.github.io/react-native/docs/button.html#examples如何在github上运行react-native示例
我的问题是: ```:如何在https://github.com/facebook/react-native/blob/master/Examples/UIExplorer/js/ButtonExample.js
我试图建立东西“index.android.js”文件运行文件ButtonExample.js
import React, {Component} from 'react';
import {
AppRegistry,
} from 'react-native';
import {examples} from './examples';
AppRegistry.registerComponent('examples',() => examples);
``` 但它没有奏效。 对不起,我的英文不好。 感谢您的阅读。
我在此项目中编写了文件名ButtonExample.js,并在文件index.android.js中导入了代码: 从'./ButtonExample'导入{ButtonExample}; 我注册了: AppRegistry.registerComponent('ButtonExample',()=> ButtonExample); 我的项目名称:ButtonTest – XuHo
您是如何运行项目的?它不工作在哪里?你能粘贴错误吗? – Ethan