Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Unrouted: React$ComponentType<{|
...ContextRouter,
someProp: string
|}> = () => <span>;
const Routed1: React$ComponentType<{| someProp: string |}> = withRouter(
Unrouted
);
// $ExpectError: This error bubbles up from the assignment in Routed2.
const Unrouted2: React$ComponentType<{|
...ContextRouter,
someProp: string
|}> = () => <span>;
const Routed2: React$ComponentType<{| someProp2: string |}> = withRouter(
Unrouted2
);
</span></span>
});
const match3: null | Match = matchPath("/the/pathname");
// $ExpectError
matchPath();
// $ExpectError
const matchError: string = matchPath("/the/pathname", {
path: "the/:dynamicId"
});
const Unrouted: React$ComponentType<{|
...ContextRouter,
someProp: string
|}> = () => <span>;
const Routed1: React$ComponentType<{| someProp: string |}> = withRouter(
Unrouted
);
// $ExpectError: This error bubbles up from the assignment in Routed2.
const Unrouted2: React$ComponentType<{|
...ContextRouter,
someProp: string
|}> = () => <span>;
const Routed2: React$ComponentType<{| someProp2: string |}> = withRouter(
Unrouted2
);
</span></span>
// matchPath
const match: null | Match = matchPath("/the/pathname", {
path: "/the/:dynamicId",
exact: true,
strict: false
});
const match2: null | Match = matchPath("/the/pathname", {
path: "/the/:dynamicId"
});
const match3: null | Match = matchPath("/the/pathname");
// $ExpectError
matchPath();
// $ExpectError
const matchError: string = matchPath("/the/pathname", {
path: "the/:dynamicId"
});
const Unrouted: React$ComponentType<{|
...ContextRouter,
someProp: string
|}> = () => <span>;
const Routed1: React$ComponentType<{| someProp: string |}> = withRouter(
Unrouted
);
// $ExpectError: This error bubbles up from the assignment in Routed2.
const Unrouted2: React$ComponentType<{|
...ContextRouter,
someProp: string</span>
}}
>
About
;
// $ExpectError
;
// DeepLinking
;
// AndroidBackButton
;
// matchPath
const match: null | Match = matchPath("/the/pathname", {
path: "/the/:dynamicId",
exact: true,
strict: false
});
const match2: null | Match = matchPath("/the/pathname", {
path: "/the/:dynamicId"
});
const match3: null | Match = matchPath("/the/pathname");
// $ExpectError
matchPath();
// $ExpectError
const matchError: string = matchPath("/the/pathname", {
path: "the/:dynamicId"
});
// $ExpectError
;
// DeepLinking
;
// AndroidBackButton
;
// matchPath
const match: null | Match = matchPath("/the/pathname", {
path: "/the/:dynamicId",
exact: true,
strict: false
});
const match2: null | Match = matchPath("/the/pathname", {
path: "/the/:dynamicId"
});
const match3: null | Match = matchPath("/the/pathname");
// $ExpectError
matchPath();
// $ExpectError
const matchError: string = matchPath("/the/pathname", {
path: "the/:dynamicId"
});
const Unrouted: React$ComponentType<{|
...ContextRouter,
someProp: string
|}> = () => <span>;
</span>
// DeepLinking
;
// AndroidBackButton
;
// matchPath
const match: null | Match = matchPath("/the/pathname", {
path: "/the/:dynamicId",
exact: true,
strict: false
});
const match2: null | Match = matchPath("/the/pathname", {
path: "/the/:dynamicId"
});
const match3: null | Match = matchPath("/the/pathname");
// $ExpectError
matchPath();
// $ExpectError
const matchError: string = matchPath("/the/pathname", {
path: "the/:dynamicId"
});
const Unrouted: React$ComponentType<{|
...ContextRouter,
someProp: string
|}> = () => <span>;
const Routed1: React$ComponentType<{| someProp: string |}> = withRouter(
Unrouted
);</span>
{
this.props.rightTextId ?
:
}
:
{/* nothing but counterbalance */}
}
;
}
}
export default withRouter(HeaderWithBack);
// Android Router
import * as Routing from 'react-router-native';
export default Routing;
export const Router = Routing.NativeRouter;
// iOS Router
import * as Routing from 'react-router-native';
export default Routing;
export const Router = Routing.NativeRouter;
onPressAdd(symbol) {
console.log('_onPressAdd', symbol);
this.props.listStore.addItem(symbol);
nativeHistory.goBack();
}