lexfro / react-layer-stack Goto Github PK
View Code? Open in Web Editor NEWLayering system for React. Useful for popover/modals/tooltip/dnd application
Home Page: https://fckt.github.io/react-layer-stack
License: MIT License
Layering system for React. Useful for popover/modals/tooltip/dnd application
Home Page: https://fckt.github.io/react-layer-stack
License: MIT License
Since React 15.5, PropTypes were removed from react itself and must now be imported from "prop-types". This breaks react-layer-stack, because all type definitions here still try to access _react2.default.PropTypes.something, but since _react2.default.PropTypes is undefined, everything crashes.
This is quite unfortunate because this module looks exactly like what I need for my current project...
You can write any question here. There is a Chat also
Hi Alexey,
I have some trouble with use
option. My code was:
<Layer id="my-id">
{() => <MyComponent item={item} />}
</Layer>
But MyComponent
did not get changed after update parent's property item
from item.children = ['a']
to item.children = ['a', 'b']
.
I have fixed that by this code:
<Layer id="my-id" use={item.children}>
{() => <MyComponent item={item} />}
</Layer>
May be it should be more predictable here.
For example, always return true
in shouldComponentUpdate
(https://github.com/fckt/react-layer-stack/blob/master/src/components.js#L61) if there is no use
parameter defined by user and there is no way to detect children props changes.
What do you think?
Awesome library! Thanks.
I only find the function names: showMe
, hideMe
and showOnlyMe
a little "childish". (Sorry, I don't know how to say it otherwise).
callback({ isActive, showMe: callback(args), showOnlyMe, hideMe, hideAll })
Can these be aliased? This is what I'm thinking about:
showMe
» add
I guess this one should be called add
. Because this function will add
the element to the DOM, and not just setting a style to make it visible.
showOnlyMe
» set
The LayerContext is being set
to display this layer, instead of adding
it to the context.
hideMe
» remove
I would call it remove
. Because this function will remove
the element from the DOM, and not just setting a style to make it invisible.
hideAll
» reset
I would call it reset
or clear
. If you don't like that name; you can also go with removeAll
.
Can you show example of using our own reducer? Apparently it doesnt work
mapStateToProps() in Connect(Component) must return a plain object. Instead received undefined.
Hi,
use: array
- array with context variables. Useful if you want to re-render the Layer if parent variables (closure) are changed
It would be great to additionally support objects as value here. What do you think?
We need to remove all dependencies and leave only React one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.