Code Monkey home page Code Monkey logo

Comments (5)

gaearon avatar gaearon commented on September 23, 2024

Basically the transition should be looking for all <VisibilitySensor>s in your code, checking if any of them has style or className attributes, and when this is the case, putting an empty <div> inside as its child with these attributes.

Before:

<VisibilitySensor className='something' />
<VisibilitySensor style={{ color: 'red' }} />

After:

<VisibilitySensor><div className='something'  /></VisibilitySensor>
<VisibilitySensor><div style={{ color: 'red' }} /></VisibilitySensor>

from react-visibility-sensor.

joshwnj avatar joshwnj commented on September 23, 2024

Thanks for the notes @gaearon - I'll use this in a new "Migrating from v1.x" section in the readme when I get some time later today.

from react-visibility-sensor.

kof avatar kof commented on September 23, 2024

Just create a changelog, this lib is not that complex.

from react-visibility-sensor.

joshwnj avatar joshwnj commented on September 23, 2024

Good call, I've added that here and will keep it updated with details of future updates: https://github.com/joshwnj/react-visibility-sensor/blob/master/CHANGELOG.md

Cheers

from react-visibility-sensor.

kof avatar kof commented on September 23, 2024

thanks!

from react-visibility-sensor.

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.