JedWatson / react-tappable

Tappable component for React
http://jedwatson.github.io/react-tappable/
MIT License
862 stars 90 forks source link

TypeError: ReactDOM.findDOMNode is not a function #72

Closed Cottin closed 8 years ago

Cottin commented 8 years ago

I run a simple example of tabbable together with react 0.14 and get this error in the console on tap:

TypeError: ReactDOM.findDOMNode is not a function.
(In 'ReactDOM.findDOMNode(this)', 'ReactDOM.findDOMNode' is undefined)

(initScrollDetection)

I get this if I use and iPhone 6 and safari and connect the phone to my computer and open up Web Inspector and look in the console.

I don't get this error if I'm running the code on my laptop and look in the console.

image

Simple example code (coffee-script):

{map, range} = require 'ramda'
AppView = React.createClass
    displayName: 'AppView'

    render: ->
        div {},
            map @renderItem, range(0, 20)

    renderItem: (i) ->
        Tappable {onTap: @onTap, key: i}, 
            span {}, "Item number #{i}"

    onTap: (e) ->
        console.log 'tap'
Cottin commented 8 years ago

Sorry, my misstake!

I used an old boilerplate with react 0.13... that's why :)