I want to reroute the index `/` to `/blog` in a gatsby project. The page at `/blog` route is generated inside `gatsby-node.js` file.

What I tried is importing `Redirect` from `@reach-router` and inside the `Index` component returning `Redirect to='/blog'` but this results in `Uncaught RedirectRequest` error.

The `index.js` file:

```
import React from 'react'
import { Redirect } from '@reach/router'

class BlogIndex extends React.Component {
  render() {
    return (
      <Redirect to={`/blog`} />
    )
  }
}

export default BlogIndex

```

[![Error](https://i.stack.imgur.com/5k9R2.png)](https://i.stack.imgur.com/5k9R2.png)