Skip to content

Commit

Permalink
Make Waypoint a named export.
Browse files Browse the repository at this point in the history
  • Loading branch information
realityking committed Dec 12, 2018
1 parent 35e6141 commit 1fea72d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ yarn add react-waypoint
## Usage

```jsx
import Waypoint from 'react-waypoint';
import {Waypoint} from 'react-waypoint';

<Waypoint
onEnter={this._handleWaypointEnter}
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ declare class Waypoint extends React.Component<Waypoint.WaypointProps, {}> {
static invisible: string;
}

export default Waypoint;
export Waypoint;

declare namespace Waypoint {
interface CallbackArgs {
Expand Down
2 changes: 1 addition & 1 deletion src/waypoint.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const BaseClass = typeof React.PureComponent !== 'undefined' ?
React.Component;

// Calls a function when you scroll to the element.
export default class Waypoint extends BaseClass {
export class Waypoint extends BaseClass {
constructor(props) {
super(props);

Expand Down
2 changes: 1 addition & 1 deletion test/performance-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';

import Waypoint from '../src/waypoint';
import { Waypoint } from '../src/waypoint';

const WAYPOINT_COUNT = 1000;

Expand Down
2 changes: 1 addition & 1 deletion test/waypoint_test.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react/no-multi-comp */
import React from 'react';
import ReactDOM from 'react-dom';
import Waypoint from '../src/waypoint.jsx';
import { Waypoint } from '../src/waypoint.jsx';

import { errorMessage as notValidErrorMessage } from '../src/ensureChildrenIsValid';
import { errorMessage as refNotUsedErrorMessage } from '../src/ensureRefIsUsedByChild';
Expand Down

0 comments on commit 1fea72d

Please sign in to comment.