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 Jan 23, 2019
1 parent 2a5306f commit 0876d16
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 @@ -24,7 +24,7 @@ const defaultProps = {
};

// Calls a function when you scroll to the element.
export default class Waypoint extends React.PureComponent {
export class Waypoint extends React.PureComponent {
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 0876d16

Please sign in to comment.