-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fantastic Idea #1
Comments
Thanks! Sorry for the late reply :) I didn't actually expect anyone to like the idea :)
I don't quite get the second one. Could you share a full example or some docs? Thanks! |
@laurci hahah I went down a rabbit hole and stumbled upon your repo and thought it could be very useful. Fair point, my biases probably belong to vue, svelte, etc. more templated code :) So I messed around with the code testing some different approaches and I didn't see a way to intercept an html tag i.e. My second example is more about simplifying react native styling. Not sure how familiar you are with react native so forgive me if I am giving too detail. In react native you have to provide an object i.e. StyleSheet for styles. Unfortunately TailwindCSS is not directly supported by TailwindCSS. There is a port |
I'm not sure of the Now I get it :) you want to pass |
// #1
{cond && <Component />}
// #2
{cond ? <Foo /> : <Bar />} #1 could me morphed into a decizional
@crherman7, you can implement this yourself 🍡 |
@aifrim hahah yes I'm well aware of these options - the directives work on custom components just not html tags i.e. div....but this is fine react-native it works for all components. |
@laurci yes this works perfectly as is thanks again! |
Nice! Let me know how it goes :) I decided to continue the project. Right now I don't have the time, but I will work on it soon. |
I love this idea and your proof of concept. What I'm really interested in this for are 2 different aspects.
In react I would love to see the use of this for directives similar to vue such as
v-if
...https://vuejs.org/guide/essentials/conditional.html#v-if-on-template. Would be a nice way to clean up ternaries and nullcoals.In react native I would love to use this for applying tailwind styles. Right now I use
twrnc
but I create proxy components to make theclassName
prop available utilizing just strings instead of doing atw.style('...')
. In this case I would be hoping to highjack & sanitize props.The text was updated successfully, but these errors were encountered: