We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
export interface RouteProps { location?: H.Location; component?: React.ComponentType<RouteComponentProps> | React.ComponentType; render?: ((props: RouteComponentProps) => React.ReactNode); children?: ((props: RouteComponentProps) => React.ReactNode) | React.ReactNode; path?: string[] | string ; exact?: boolean; sensitive?: boolean; strict?: boolean; }
If you know how to fix the issue, make a pull request instead.
@types/xxxx
Definitions by:
index.d.ts
@sergey-buturlakin @mrk21 @vasek17
The text was updated successfully, but these errors were encountered:
v 4.4.0 was recently released, has what you need: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/index.d.ts#L80
Sorry, something went wrong.
@jtreminio Thank you!!
proptypes still complains, though. You can use the following to suppress the console warning: remix-run/react-router#5866 (comment)
why not just fix the propTypes?
Here's my slightly cleaner but still very "hacky" solution:
import { Route } from 'react-router-dom'; import { oneOfType, array, string } from 'prop-types'; Route.propTypes.path = oneOfType([array, string]);
No branches or pull requests
export interface RouteProps {
location?: H.Location;
component?: React.ComponentType<RouteComponentProps> | React.ComponentType;
render?: ((props: RouteComponentProps) => React.ReactNode);
children?: ((props: RouteComponentProps) => React.ReactNode) | React.ReactNode;
path?: string[] | string ;
exact?: boolean;
sensitive?: boolean;
strict?: boolean;
}
If you know how to fix the issue, make a pull request instead.
@types/xxxx
package and had problems.Definitions by:
inindex.d.ts
) so they can respond.@sergey-buturlakin @mrk21 @vasek17
The text was updated successfully, but these errors were encountered: