React reusable component example #44
Replies: 11 comments 9 replies
-
That looks just amazing! I see you used a lot of twind features. Really great. Things i really like:
Just a few things if you are open for it:
The next two are just to show what may be used for optimal performance.
This is really good. Thanks for sharing. Would you be interested in testing/trying the twind/styled PR? |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
After seeing this application we may need to support some kind of comment syntax with template literals... |
Beta Was this translation helpful? Give feedback.
-
Thanks for all the feedback and happy to share! I really enjoy using Twind. As far as inlining the I’ve made the other changes that you recommended. I appreciate the tip about caching with the inline functions 👍. And, yes, I’d be happy to try out the styled API. I skimmed through the PR the other day and I’ve actually been looking forward to trying it! And sure, you are welcome to add this example to the “Show & Tell”! And yes, comments would also be great! |
Beta Was this translation helpful? Give feedback.
-
You're right inline bgClassNames does not work. I think that has to do with some optimization we do for the template literal case. I'll look into it. |
Beta Was this translation helpful? Give feedback.
-
Happy New Year! 🎉 I’ve added some new components to this demo, some using the CodeSandbox Link: https://codesandbox.io/s/twind-react-typescript-wmm6t |
Beta Was this translation helpful? Give feedback.
-
That is awesome!!!! Great job. You have use so many features of twind – this is a really good showcase. Would you be willing to add that to the tw-in-js org? I have created a repo (https://github.com/tw-in-js/example-react-typescript) and gave you maintain access. I'd love for more people to see that and use it a reference for the things that can be done with twind. |
Beta Was this translation helpful? Give feedback.
-
Thanks! I’ve made some changes to the project and pushed the updated version to https://github.com/tw-in-js/example-react-typescript. The bigger changes include:
|
Beta Was this translation helpful? Give feedback.
-
I created a fork of the React/TypeScript CodeSandbox demo using the https://codesandbox.io/s/twind-apply-react-typescript-73pm9 The |
Beta Was this translation helpful? Give feedback.
-
Yup, I agree about using Thanks for the feedback on the other things. Sorry I haven't had more time to convert this stuff into documentation. I'm going to have more time in the coming weeks and plan on helping with the docs. The
|
Beta Was this translation helpful? Give feedback.
-
This is an excellent explanation, thank you. This definitely helps to clarify the concepts as well as your thoughts behind them. Just as a summary (please correct me if I my understanding is wrong on any of these):
Note: |
Beta Was this translation helpful? Give feedback.
-
I created an example reusable React component using Twind and thought I’d share the link for anyone interested. If you have any thoughts on how to improve it, please share!
CodeSandbox Link: https://codesandbox.io/s/twind-react-typescript-wmm6t
override
variantBeta Was this translation helpful? Give feedback.
All reactions