@ofm/history

wapper history for react-route-v4

Usage no npm install needed!

<script type="module">
  import ofmHistory from 'https://cdn.skypack.dev/@ofm/history';
</script>

README

ajax

describe('test resetHistory', () => {
    test('resetHistory', async () => {
        const location = { pathname: '/abc' };
        expect(history.createHref(location)).toEqual('/abc');
        resetHistory({
            basename: '/api',
        });
        expect(history.createHref(location)).toEqual('/api/abc');
    });
});

related

history