Inferno: Property 'refs' is missing in type 'StaticRouter'

Created on 26 Apr 2018  路  4Comments  路  Source: infernojs/inferno

Hello,

I am currently got an issue with inferno-server and I am hoping you can help me out.

Observed Behaviour

When using inferno-router server-side I am using <StaticRouter> to renderToString in my app. The project is using typescript with tsx files.

When compiling I am receiving an error:

TS2605: JSX element type 'StaticRouter' is not a constructor function for JSX elements.
Property 'refs' is missing in type 'StaticRouter'.

If you need an example of this behaviour I can push my code on a github repo as an example.

Not sure if I have missed out something is this a bug with StaticRouter and Typescript types

Expected Current Behaviour

Inferno-server's <StaticRouter> should compile without error

Inferno Metadata

Inferno: 5.0.3
Inferno-server: 5.0.3
Typescript: 2.7.2

macOS
Chrome

bug

All 4 comments

Hi @Elliot-Evans-95 it looks like bug, can you fix it? :)

@Havunen I will have a look into it and see if I can fix it 馃槂

Thanks @Havunen Will try out v5.0.5 in my project to see if its fixed it! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mohammedzamakhan picture mohammedzamakhan  路  3Comments

xkxx picture xkxx  路  4Comments

EmilTholin picture EmilTholin  路  5Comments

yury-dymov picture yury-dymov  路  5Comments

nassirdreffy picture nassirdreffy  路  4Comments