Framework7 React Package Structure
Package
Framework7 React package contains the following files and folders:
framework7-react/
bundle/
cjs/
components/
accordion.js
accordion-content.js
...
framework7-react.js
components/
accordion/
package.json
accordion-item/
package.json
...
esm/
components/
accordion.js
accordion-content.js
...
framework7-react.js
React Plugin
Framework7 React plugin provided as ES/CJS 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>
)