Giter VIP home page Giter VIP logo

Comments (20)

qwtel avatar qwtel commented on June 12, 2024

Ah, thank you for trying the component with react 0.14.

I've heard of this change, but I don't know how to best handle it, so that the component can be used with react 0.13 and 0.14.
Checking for getDOMNode to be defined seems like a pretty brute way to do it :/
Happy to receive any input concerning this.

from react-slider.

hugihlynsson avatar hugihlynsson commented on June 12, 2024

Yeah, I'm not sure either what is the best way to go forward with this, without breaking backwards comparability. In React 0.14, this is only a warning, so maybe is should just stay like it is until it will be totally deprecated.

from react-slider.

qwtel avatar qwtel commented on June 12, 2024

Now would be the time to fix the warning so the component doesn't break when it is totally deprecated.
I assume there will be a suggested way of handling this once 0.14 is released. Or we just add the check...

from react-slider.

canfie1d avatar canfie1d commented on June 12, 2024

I think .findDOMNode() replaces it, no?
http://www.omerwazir.com/posts/react-getdomnode-replaced-with-findDOMNode/

from react-slider.

hugihlynsson avatar hugihlynsson commented on June 12, 2024

@canfie1d That change was introduced in React 0.13, but 0.14 includes further changes. findDOMNode() is no longer a part of the react package, but rather a new react-dom package. Also, refs that point to a DOM component now are the DOM node, and should not be wrapped with findDOMNode(). See more here in the React 0.14 blog post

from react-slider.

canfie1d avatar canfie1d commented on June 12, 2024

Ah- I see. Thanks for that.

from react-slider.

dmitry avatar dmitry commented on June 12, 2024

Looks like the right way to release new version of a package with strict dependency to react 0.14.

PS. Similar idea: moroshko/react-autosuggest@4ab699d

from react-slider.

qwtel avatar qwtel commented on June 12, 2024

Thanks for looking it up πŸ‘

from react-slider.

martpie avatar martpie commented on June 12, 2024

Any news on that ? react 0.14 is out now.

Instead of findDOMNode, just use refs:

render() {
    return <div ref='element'></div>;
}

doSomething() {
    console.log(this.refs.element); // will print the node element to the console
}

from react-slider.

nuclearspike avatar nuclearspike commented on June 12, 2024

I too am looking forward to .14 support.

from react-slider.

nuclearspike avatar nuclearspike commented on June 12, 2024

The warning stops happening if you just remove the ".findDOMNode()" from 2 places in the code.

from react-slider.

martpie avatar martpie commented on June 12, 2024

I submitted a PR for that, but the maintainer seems inactive.

from react-slider.

gabssnake avatar gabssnake commented on June 12, 2024

@KeitIG your PR doesn’t seem to update package.json or handle compatibility with 0.13

from react-slider.

martpie avatar martpie commented on June 12, 2024

True dat, doing it asap.

from react-slider.

martpie avatar martpie commented on June 12, 2024

Done.

from react-slider.

mauricesvay avatar mauricesvay commented on June 12, 2024

πŸ‘

from react-slider.

Martindelataille avatar Martindelataille commented on June 12, 2024

Waiting fix too. @KeitIG Thanks

from react-slider.

martpie avatar martpie commented on June 12, 2024

@Martindelataille, yep, would be great if the PR was accepted now :)

from react-slider.

martpie avatar martpie commented on June 12, 2024

Issue can be closed now a new version is released. poke @hugihlynsson

from react-slider.

hugihlynsson avatar hugihlynsson commented on June 12, 2024

Super!

from react-slider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.