Comments (8)
I am!
from react-sizeme.
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.
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.
could SizeMe
just clone and return its child and make sure that only a single child is ever sent?
from react-sizeme.
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.
Awesome! Shout if you need anything. 😊
from react-sizeme.
Started to flesh out an API: https://codesandbox.io/s/oxkw6xv4z6
from react-sizeme.
Published a new version including a render props pattern based component 🎉
from react-sizeme.
Related Issues (20)
- react-sizeme not hoisting statics HOT 1
- height doesnt get measured in some cases HOT 3
- MEGA Chrome extension breaks sizeme using object strategy with placeholders HOT 2
- HOC usage is not forwarding refs HOT 1
- TypeScript types are incomplete HOT 1
- console.error in storybook jest snapshot testing HOT 2
- [Warn] Cannot update a component from a different component. HOT 1
- How to jest mock the size HOT 3
- Width and height remain undefined HOT 1
- findDOMNode is deprecated in StrictMode HOT 6
- React 17 support HOT 3
- HOC onSize callback alternative usage example not working HOT 1
- Multiple SizeMe components inside one another?
- Open Collective link is broken HOT 2
- GitHub CI needed HOT 1
- Use Resize Observer? HOT 2
- Sizable input lost focus
- Feature Request: clientHeight, offsetHeight and scrollHeight
- Placeholder size not updating until a state change HOT 1
- React size me parent height collapsed when rendering with placeholder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-sizeme.