Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

How to use with functional components? #1

Open
Maadtin opened this issue Aug 28, 2019 · 5 comments
Open

How to use with functional components? #1

Maadtin opened this issue Aug 28, 2019 · 5 comments

Comments

@Maadtin
Copy link

Maadtin commented Aug 28, 2019

How to use this package using functional components?

@LastDreamer
Copy link
Owner

LastDreamer commented Aug 29, 2019

Hi @Maadtin I added code example. Also you can found it on storybook

@Maadtin
Copy link
Author

Maadtin commented Aug 29, 2019

Hello! in wrapping my routes with Prefetch and React throws an error You should not use <Route> or withRouter() outside a <Router> do you know why that would happend?

@LastDreamer
Copy link
Owner

It is a react-router error. You probably forgot to use Router component on top of your app

@LastDreamer
Copy link
Owner

Also prefetch module written using legacy react context API. This is also can be reason for this.
I don't update this for a long time. Maybe i can rewrite module with new api support.
I will keep in touch in this issue

@LastDreamer LastDreamer reopened this Aug 30, 2019
@Maadtin
Copy link
Author

Maadtin commented Aug 30, 2019

Well, I don't think it's a react router issue since i've followed the example in the readme like this and still that error popups..

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants