Closed doong-jo closed 7 months ago
Thanks for the contribution!
However, this approach requires developers to manually add the className prop, which can be cumbersome.
I'm confused by what you're describing here. twrnc
doesn't use a className
prop at all, since that's not a prop on RN components.
And I guess overall, I'm having trouble grokking which pain point this solves, or exactly what value this function is providing. Could you give me some examples of code samples without sx that are awkward or unergonomic, that sx
improves?
As time goes by, this seems to have something to do with my code style. I don't think it's a necessary change for this repository, so I'll close it. Thanks to your reply
This is a utility that proves to be useful when wanting to merge internal and external styles within a component. I've been actively using the
sx
function in my current project, finding it immensely helpful. Hence, I thought it would be a beneficial addition totwnrc
.Currently, we need to receive
className
as a string and pass it as an argument totw.style
. However, this approach requires developers to manually add theclassName
prop, which can be cumbersome.sx
, on the other hand, mitigates this effort by accepting RN'sStyleProp
as the second parameter, simplifying the process of passing styles.