You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, thank you for creating and sharing this package, I've been looking for a replacement for connected-react-router and this package seems to be the best fit.
While in the process of swapping out code, I noticed that I get a lot of TS errors when I use RouterState related fields, predominantly location, which I wasn't when using connected-react-router. Checked their type definition and it seems that the location field for their RootState type isn't optional: https://github.com/supasate/connected-react-router/blob/master/index.d.ts#L34
I am wondering why & when location can be null/ undefined ? Adding type guards everywhere seems like a hacky way of addressing the issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
Firstly, thank you for creating and sharing this package, I've been looking for a replacement for
connected-react-router
and this package seems to be the best fit.While in the process of swapping out code, I noticed that I get a lot of TS errors when I use
RouterState
related fields, predominantlylocation
, which I wasn't when usingconnected-react-router
. Checked their type definition and it seems that thelocation
field for theirRootState
type isn't optional: https://github.com/supasate/connected-react-router/blob/master/index.d.ts#L34I am wondering why & when
location
can be null/ undefined ? Adding type guards everywhere seems like a hacky way of addressing the issue.Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions