Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for React.forwardRef and React.createRef #278

Merged
merged 1 commit into from
Nov 20, 2018

Commits on Nov 20, 2018

  1. Add support for React.forwardRef and React.createRef

    Components wrapped with `React.forwardRef` will now correctly have their refs passed to `react-waypoint` as they don't recognize custom `innerRef` prop, but should know what to do with received `ref` (that is - pass it to underlaying DOM element).
    
    Also the support for `React.createRef` has been added - which is a new React API, an alternative to callback refs. It returns an object with shape of `{ current: null }`, so the ref can and should be set on the `current` property (it's done by React internally when passingit as ref prop to an element).
    Andarist committed Nov 20, 2018
    Configuration menu
    Copy the full SHA
    3960e0d View commit details
    Browse the repository at this point in the history