Framework7 React Package Structure
Package
Framework7 React package contains the following files and folders:
framework7-react/
components/
accordion.js
accordion.d.ts
accordion-item.js
accordion-item.d.ts
...
framework7-react.js
framework7-react.d.ts
React Plugin
Framework7 React plugin provided as ES module:
// Import Framework7 Core
import Framework7 from 'framework7/lite';
/*
Or import bundle with all components:
import Framework7 from 'framework7/lite-bundle';
*/
// Import Framework7 React
import Framework7React from 'framework7-react';
// Init plugin
Framework7.use(Framework7React)
By default it exports only Framework7-React plugin without any React components. To import components separately, we need to use named import:
import { App, View } from 'framework7-react';
export default () => (
<App>
<View>
...
</View>
</App>
)
On this page