Skip to content

Commit 32265ec

Browse files
fix(common): correct Flow type syntax in routing component
1 parent 16842c2 commit 32265ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/elements/common/routing/withRouterAndRef.js.flow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Route } from 'react-router-dom';
55
// Basically a workaround for the fact that react-router's withRouter cannot forward ref's through
66
// functional components. Use this instead to gain the benefits of withRouter but also ref forwarding
77
export default function withRouterAndRef(Wrapped: React.ComponentType<any>) {
8-
const WithRouterAndRef = React.forwardRef<Object, React.Ref<any>>((props, ref) => (
8+
const WithRouterAndRef = React.forwardRef((props: any, ref: React.Ref<any>) => (
99
<Route>{routeProps => <Wrapped ref={ref} {...routeProps} {...props} />}</Route>
1010
));
1111
const name = Wrapped.displayName || Wrapped.name || 'Component';

0 commit comments

Comments
 (0)