Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
Fixed: ``Uncaught TypeError: (0 , _reactRouterScroll2.default) is not…
Browse files Browse the repository at this point in the history
… a function``

We now
  [only import
``useScroll``](https://github.com/taion/react-router-scroll#minimizing-b
undle-size)
  from react-router-scroll (as we only use this).
  ``[email protected]`` was exporting a default value,
``0.3.2`` is not.

Closes #652
  • Loading branch information
MoOx committed Aug 23, 2016
1 parent d50d624 commit ebd44c9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# HEAD

- Fixed: ``Uncaught TypeError: (0 , _reactRouterScroll2.default) is not a function``
We now
[only import ``useScroll``](https://github.com/taion/react-router-scroll#minimizing-bundle-size)
from react-router-scroll (as we only use this).
``[email protected]`` was exporting a default value, ``0.3.2`` is not.
([#627](https://github.com/MoOx/phenomic/issues/652) - @MoOx)
- Added: better webpack build notifications.
We replaced
[`webpack-error-notifications`](https://github.com/vsolovyov/webpack-error-notification)
Expand Down
10 changes: 8 additions & 2 deletions flow/interfaces/node-modules/react-router-scroll.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
type useScroll =
(shouldUpdateScroll?: () => boolean | Array<number>) => Function

declare module "react-router-scroll" {
declare var exports:
(shouldUpdateScroll?: () => boolean | Array<number>) => Function;
declare var exports: useScroll;
}

declare module "react-router-scroll/lib/useScroll" {
declare var exports: useScroll
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"opn": "^4.0.2",
"pify": "^2.3.0",
"portfinder": "^1.0.2",
"react-router-scroll": "^0.3.1",
"react-router-scroll": "^0.3.2",
"redbox-react": "^1.2.2",
"remark": "^5.0.0",
"remark-autolink-headings": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from "react"
import ReactDOM from "react-dom"
import { Router, useRouterHistory, applyRouterMiddleware } from "react-router"
import createBrowserHistory from "history/lib/createBrowserHistory"
import useScroll from "react-router-scroll"
import useScroll from "react-router-scroll/lib/useScroll"
import { Provider as ReduxContextProvider } from "react-redux"

import PhenomicContextProvider from "../ContextProvider"
Expand Down

0 comments on commit ebd44c9

Please sign in to comment.