我想知道如何渲染一些 Shoutem 扩展,为简单起见,我将把它渲染为我唯一的组件,如下所示:
import 'es6-symbol/implement';
import React from 'react';
import {
AppRegistry,
View
} from 'react-native';
import { AppBuilder } from '@shoutem/core';
import { NavigationBar } from '@shoutem/ui';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import extensions from './extensions.js';
import { screens } from './extensions/kevinyclu.restaurants/app/index';
const List = screens.List;
const store = createStore((state, action) => state);
const App = () => <Provider store={store}><View><List /></View></ Provider>;
// noinspection JSCheckFunctionSignatures
AppRegistry.registerComponent('Restaurant', () => App);
虽然如果我用我const App = ...
最初在那里的代码替换shoutem configure
const App = new AppBuilder()
.setExtensions(extensions)
.setRenderNavigationBar(renderNavigationBar)
.build();
然后一切正常,所以我想知道如何使用 Shoutem 扩展?还是我完全错过了扩展的重点?