civiccc / civiccc/react-waypoint

[Question] No way accessing Waypoint's first children's ref?

Open
#266 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4k
Forks
206
PR merge metrics
No merged PRs in 30d

Description

Hello, thanks for this library.
I want to ask how to access waypoint's first children's ref?
Because if I access it, it will break the app.
Please see this minimum example code.
[![Edit 2o75kkxvry](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/2o75kkxvry)
```javascript
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Waypoint from 'react-waypoint';

class App extends Component {
constructor(props) {
super(props);
this.element = React.createRef();
}
render() {
return (



Hello CodeSandbox

// this line will break


);
}
}

const rootElement = document.getElementById('root');
ReactDOM.render(, rootElement);

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.