question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onEnter never fires

See original GitHub issue

Here is my code

  renderBlocks = () => {
    const {
      items
    } = this.props;

    if (items.length) {
      return <section>
        {(() => {
          return items.map((item, index) => {
            return <Block testimonial={ item } key={ index } />
          });
        })()}
      </section>
    } else {
      return <NoPost />
    }
  };

  renderWaypoint = () => {
    return <Waypoint
        onEnter={ this.loadBlocks }>
          <span>Loading..</span>
        </Waypoint>
  }

  loadBlocks = () => {
    console.log('loading more!');
  }

  render() {
    return (
      <section>

        <div>
          { this.renderBlocks() }
        </div>

        <div className='waypoint'>
          { this.renderWaypoint() }
        </div>

      </section>
    )
  }

However, the Waypoint only gets fired once and never again (even when scrolled upon). What could be the issue that is preventing the Waypoint from working?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
stanleycyangcommented, Feb 22, 2017

I switched modules to this with the same example and it worked. I don’t get why Waypoint wouldn’t do the same though.

@trotzig No I don’t have a public example of it. I can try and put one together though

0reactions
jamespleasecommented, Feb 23, 2017

@stanleycyang , no need to apologize. That’s pretty interesting, but a real pain! Thanks for taking the time to follow up here. I hope you’re able to get things working as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

onEnter never fires · Issue #158 · civiccc/react-waypoint · GitHub
However, the Waypoint only gets fired once and never again (even when scrolled upon). What could be the issue that is preventing the...
Read more >
Solved: OnEnter event never fires for edit box with TWebBrowser ...
Hi, I've noticed that when I click on the TWebBrowser then click on the edit box, the OnEnter event for the edit box...
Read more >
onEnter not called in React-Router - Stack Overflow
Ok, I'm fed up trying. The onEnter method doesn't work. Any idea ...
Read more >
The attribute for input tag"onchange" will not fire, but ...
onchange is only triggered when the control is out of focus. That means you have to click outside of the input field after...
Read more >
ScrollTrigger onEnter only fires when scrolling down - GSAP ...
Perhaps you're looking for this?: See the Pen LYdPKew?editors=0010 by GreenSock (@GreenSock) on CodePen Steve is correct - onEnter is for when it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found