You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as usual, i must always begin w/ deep gratitude to @levithomason & @layershifter for kicking so much butt on this project. thanks gents.
problem statement
I want to borrow/steal your code, but I'm not clear how.
context
designing components that gracefully, happily merge user-provided props in with the default props a component provides can be tedious/verbose/difficult. I think RSUI's answer to this problem is this babel plugin? example of this discussed below.
discussion
in each RSUI component, render() juggles classnames, styles, etc, and carefully drops props into each root export. for example, see here.
we wrote a little utility here that sniffs user props, and returns those which we will pass to the root node.
our solution ^above^ does not gracefully handle classNames, styles, etc. i'm interested in exploring a solution that does, and not creating a snowflake.
is the RSUI team content with how {...rest} props are generated?
are there ways to enable graceful generation of {...rest} properties external of this project?
if there are areas to improve here to make ^^ possible, a) would you be interested, b) can I help!
thanks for the time.
The text was updated successfully, but these errors were encountered:
is the RSUI team content with how {...rest} props are generated?
Very much so.
are there ways to enable graceful generation of {...rest} properties external of this project?
The babel plugin you noted does exactly this. We also use lib/getUnhandledProps.js, though, it now just partitions props based on the handledProps generated by the babel plugin.
if there are areas to improve here to make ^^ possible, a) would you be interested, b) can I help!
We're definitely interested in this. You can see thoughts on a base component that handles all these tasks here #419. I'd like to pull all this functionality into a HOC.
rad! should we just close this and focus over there? this conversation really is a sub-discussion (i think) of #419 as this topic must be addressed transitively to complete #419.
as usual, i must always begin w/ deep gratitude to @levithomason & @layershifter for kicking so much butt on this project. thanks gents.
problem statement
I want to borrow/steal your code, but I'm not clear how.
context
designing components that gracefully, happily merge user-provided props in with the default props a component provides can be tedious/verbose/difficult. I think RSUI's answer to this problem is this babel plugin? example of this discussed below.
discussion
in each RSUI component,
render()
juggles classnames, styles, etc, and carefully drops props into each root export. for example, see here.we wrote a little utility here that sniffs user
props
, and returns those which we will pass to the root node.our solution ^above^ does not gracefully handle classNames, styles, etc. i'm interested in exploring a solution that does, and not creating a snowflake.
{...rest}
props are generated?{...rest}
properties external of this project?thanks for the time.
The text was updated successfully, but these errors were encountered: