aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/react-docs')
-rw-r--r--packages/react-docs/package.json2
-rw-r--r--packages/react-docs/src/components/doc_reference.tsx10
2 files changed, 1 insertions, 11 deletions
diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json
index 04e1387c6..d3ccfa8da 100644
--- a/packages/react-docs/package.json
+++ b/packages/react-docs/package.json
@@ -50,7 +50,7 @@
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-markdown": "^3.2.2",
- "react-scroll": "0xproject/react-scroll#similar-to-pr-330-but-with-replace-state",
+ "react-scroll": "0xproject/react-scroll#pr-330-and-replace-state",
"react-tooltip": "^3.2.7",
"semver": "5.5.0",
"styled-components": "^3.3.0"
diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx
index 00b1286a4..85547576b 100644
--- a/packages/react-docs/src/components/doc_reference.tsx
+++ b/packages/react-docs/src/components/doc_reference.tsx
@@ -52,12 +52,6 @@ export interface DocReferenceProps {
export interface DocReferenceState {}
export class DocReference extends React.Component<DocReferenceProps, DocReferenceState> {
- public componentDidMount(): void {
- window.addEventListener('hashchange', this._onHashChanged.bind(this), false);
- }
- public componentWillUnmount(): void {
- window.removeEventListener('hashchange', this._onHashChanged.bind(this), false);
- }
public componentDidUpdate(prevProps: DocReferenceProps, _prevState: DocReferenceState): void {
if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) {
const hash = window.location.hash.slice(1);
@@ -323,8 +317,4 @@ export class DocReference extends React.Component<DocReferenceProps, DocReferenc
/>
);
}
- private _onHashChanged(_event: any): void {
- const hash = window.location.hash.slice(1);
- sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
- }
}