cyclejs-community / cyclic-router

Router Driver built for Cycle.js
MIT License
109 stars 25 forks source link

I can't run example in readme #129

Closed hesidoryn closed 7 years ago

hesidoryn commented 7 years ago

I'm a beginner in cyclejs( in nodejs too). And i can't run example in readme. I installed all nedded packages, but i see an error "makeHistoryDriver throws error for a proper history object...". Can you correct example in readme and explain me why this error causes? Sorry for maybe dumb question.

andreloureiro commented 7 years ago

@HeorhiSidorin maybe you have history@4.x.x in your dependencies. If that's the case, downgrading it to version 3.2.1 should fix this error.

Malusovium commented 7 years ago

190 Will fix this problem by correcting the readme. So one can use the latest history package: history@4.x.x.

like so:

import { createBrowserHistory } from 'history' 

router: makeRouterDriver(createBrowserHistory(), switchPath) 
ntilwalli commented 7 years ago

I merged the README PR referenced above.