This react component displays a widget which has the top list of frequently visited by the user. This component is using localStorage to store the required data. The widget can be themed using CSS.
<div class="react-frequent-pages-widget"> <div class="react-frequent-pages-widget-title">Freqently Visited Pages</div> <ul class="react-frequent-pages-widget-items"> <li class="react-frequent-pages-widget-item">...</li> <li class="react-frequent-pages-widget-item">...</li> <li class="react-frequent-pages-widget-item">...</li> .... ... </ul> </div>
Live demo: https://github.com/thamizhchelvan/React-Frequent-Pages
The easiest way to use react-frequent-pages is to install it from NPM and include it in your own React build process (using Browserify, Webpack, etc).
You can also use the standalone build by including dist/react-frequent-pages.js
in your page. If you use this, make sure you have already included React, and it is available as a global variable.
npm install react-frequent-pages --save
import the component wherever it's required. Then use the component with the required size (default is 5). A detailed implementation details is available here: React Frequent Pages Component Installation
import ReactFrequentPages from 'react-frequent-pages';
...
...
<div><ReactFrequentPages size={7}/></div>
MIT
Copyright (c) 2017 Thamizhchelvan Govindan.