Skip to content

Commit

Permalink
Improve global pending example
Browse files Browse the repository at this point in the history
  • Loading branch information
taion committed Nov 1, 2016
1 parent df8089b commit fc41f96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/global-pending/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ const BrowserRouter = createBrowserRouter({
},
{
path: 'bar',
getComponent: () => new Promise((resolve) => {
setTimeout(resolve, 1000, () => <div>Bar</div>);
Component: ({ data }) => <div>{data}</div>, // eslint-disable-line react/prop-types
getData: () => new Promise((resolve) => {
setTimeout(resolve, 1000, 'Bar');
}),
},
],
Expand Down

0 comments on commit fc41f96

Please sign in to comment.