GithubHelp home page GithubHelp logo

Comments (8)

chrisdrackett avatar chrisdrackett commented on May 13, 2024 1

I am!

from react-sizeme.

chrisdrackett avatar chrisdrackett commented on May 13, 2024 1

actually I might have spoken too soon, I'm going to take a look at https://github.com/souporserious/react-measure first, as it seems to support this format already and we have other components that also use it already.

Not that I'm against helping out, it just might not be right away 😊

from react-sizeme.

ctrlplusb avatar ctrlplusb commented on May 13, 2024

It's an interesting concept. Although we would have to make the SizeMe component render out a div or something similar, which would then be measured and then it's size would be passed down into the render callback function.

Additional props could be applied to the div (outside of the expected SizeMe config props) - such as className/style etc, and we could even support a tag prop so you can change the container type (e.g. div/span etc).

This could be just a special component that encapsulates the existing API. Are you happy to experiment in creating this wrapper component? And then we could look at incorporating it if we found it useful.

from react-sizeme.

chrisdrackett avatar chrisdrackett commented on May 13, 2024

could SizeMe just clone and return its child and make sure that only a single child is ever sent?

from react-sizeme.

ctrlplusb avatar ctrlplusb commented on May 13, 2024

Yeah, that sounds like an option. 😀

I would love for us to explore this more. Are you up for starting up a PR?

from react-sizeme.

ctrlplusb avatar ctrlplusb commented on May 13, 2024

Awesome! Shout if you need anything. 😊

from react-sizeme.

ctrlplusb avatar ctrlplusb commented on May 13, 2024

Started to flesh out an API: https://codesandbox.io/s/oxkw6xv4z6

from react-sizeme.

ctrlplusb avatar ctrlplusb commented on May 13, 2024

Published a new version including a render props pattern based component 🎉

from react-sizeme.

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.