Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixes sandbox
  • Loading branch information
bradenhs committed May 23, 2019
1 parent cadb64d commit 22dd393
Show file tree
Hide file tree
Showing 8 changed files with 370 additions and 371 deletions.
7 changes: 5 additions & 2 deletions docs/guides/react.md
Expand Up @@ -2,9 +2,10 @@
title: React
---

```jsx codesandbox-react
```tsx codesandbox-react
import React, { useState, useEffect } from "react";
import { createRouter, defineRoute } from "type-route";
import ReactDOM from "react-dom";
import { createRouter, defineRoute, Route } from "type-route";

const { routes, listen, getCurrentRoute } = createRouter({
home: defineRoute("/"),
Expand Down Expand Up @@ -87,4 +88,6 @@ function Navigation() {
</nav>
);
}

ReactDOM.render(<App />, document.querySelector("#root"));
```
4 changes: 2 additions & 2 deletions docs/introduction/getting-started.md
Expand Up @@ -12,15 +12,15 @@ Continue reading this page for a quick overview of how to start using Type Route

Type Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).

```sh
```bash
npm install type-route
```

## Step 1: Create a Router

`router.ts`

```ts
```typescript
import { createRouter, defineRoute } from "type-route";

export const { routes, listen, getCurrentRoute } = createRouter({
Expand Down

0 comments on commit 22dd393

Please sign in to comment.