bufdirstat
An SPA React Component providing a frontend for statcontent, Bufdir's Strapi based API for statistics content
Usage
npm install bufdir_stat
In code:import React from "react";
import ReactDOM from "react-dom";
import StatisticsApp from "bufdir_stat";
...
ReactDOM.render(
<React.StrictMode>
<StatisticsApp
baseUrl={yourBaseUrlForThisApp}
strapiUrl={yourURLToTheStrapiApi}
/>
</React.StrictMode>,
document.querySelector('#root')
);
The package exports a single React component that expects the properties:- baseUrl - the URL context from which the embedding application serves this component.
- strapiUrl - the URL path to the Strapi api that serves data to the component.
Peer Dependencies
Note that there are the following peer dependencies:- "react": "^17.0.2",
- "react-dom": "^17.0.2",
- "react-router-dom": "^6.3.0",
- "buflib": "^2.0.0"