mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Update test
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
import { Link, Location, RouteComponentProps, Router } from "@reach/router";
|
||||
import {
|
||||
Link,
|
||||
Location,
|
||||
RouteComponentProps,
|
||||
Router,
|
||||
Redirect
|
||||
} from "@reach/router";
|
||||
import * as React from "react";
|
||||
import { render } from "react-dom";
|
||||
|
||||
@@ -21,9 +27,10 @@ render(
|
||||
<NotFound default />
|
||||
|
||||
<Link to="/somepath" rel="noopener noreferrer" target="_blank" />
|
||||
<Redirect to="/somepath" replace={false} state={{ from: "/" }} />
|
||||
|
||||
<Location>
|
||||
{(context) => (
|
||||
{context => (
|
||||
<>
|
||||
<div>hostname is {context.location.hostname}</div>
|
||||
<button onClick={() => context.navigate("/")}>
|
||||
@@ -33,5 +40,5 @@ render(
|
||||
)}
|
||||
</Location>
|
||||
</Router>,
|
||||
document.getElementById("app-root"),
|
||||
document.getElementById("app-root")
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user