Undo Prettier auto-formatting

This commit is contained in:
Marcel Michau
2017-12-14 18:07:29 +02:00
parent 2bcad76d60
commit 89be90ad82

View File

@ -0,0 +1,10 @@
### Redirect to URL
Use `window.location.href` or `window.location.replace()` to redirect to `url`.
Pass a second argument to simulate a link click (`true` - default) or an HTTP redirect (`false`).
```js
const redirect = (url, asLink = true) =>
asLink ? window.location.href = url : window.location.replace(url);
// redirect('https://google.com')
```