Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling web module fails due to missing history property #208

Open
sverkera opened this issue Apr 10, 2023 · 0 comments
Open

Compiling web module fails due to missing history property #208

sverkera opened this issue Apr 10, 2023 · 0 comments

Comments

@sverkera
Copy link

Compiling the web module fails with the following error:
`TS2322: Type '{ children: Element; history: MemoryHistory; }' is not assignable to type 'IntrinsicAttributes & RouterProps'.
Property 'history' does not exist on type 'IntrinsicAttributes & RouterProps'.
62 |
63 | render(

64 |
| ^^^^^^^
65 |
66 | ,
67 | { wrapper: TestWrapper }`

This happens on Landing.test.tsx and Welcome.test.tsx.

To work around the issue and make the compile work I changed to the following but I don't know if this gives the intended behaviour since I'm not familiar with React:
render( <Router location={history.location} navigator={history}> <Landing /> </Router>, { wrapper: TestWrapper } );

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

No branches or pull requests

1 participant