gluestack / gluestack-ui

React & React Native Components & Patterns (copy-paste components & patterns crafted with Tailwind CSS (NativeWind))
https://gluestack.io/
MIT License
2.79k stars 121 forks source link

Generated components have TypeScript errors #2518

Open benoit-ctrl opened 1 month ago

benoit-ctrl commented 1 month ago

Firstly, thanks for you work on Gluestack and for the community ! I encountered a TypeScript problem when using some Gluestack components so I decided to share it here.

Description

In some components like Heading and Icon there is TypeScript errors

CodeSandbox/Snack link

(none, failed to install Tailwind in Snack)

Steps to reproduce

  1. Install Heading or Icon component for example
  2. Check the generated files in your IDE with integrated TypeScript service or try to compile manually with tsc
  3. Observe reported TypeScript errors

gluestack-ui Version

2 (latest)

Platform

Other Platform

No response

Additional Information

image image
Viraj-10 commented 1 month ago

Hey @benoit-ctrl, This issues will be fixed in #2475.

benoit-ctrl commented 1 month ago

Hello @Viraj-10, thank you for your answer👌 !

I have a question, since Gluestack is a "copy-paste components" library the only way to get update is to re-generate components after a library update ? If so, then if we've already customized Gluestack components it's starts to be more complicated I suppose

Viraj-10 commented 1 month ago

@benoit-ctrl, Yes, You should just create a branch from you main and add all the installed components. you will be able to see all the changes through diff. discard all the unwanted changes and commit your changes.

We know this is a pain point for all the customised components. we are planning to split style files from components. so, it would be easier to update.

Also we will be publishing Diff with every release and releases would be on weekly bases and planning on adding update command.

benoit-ctrl commented 1 month ago

@Viraj-10 Thank you for your detailed answer, I understand better now 😁

It's a great idea trying to support a little the updating process through tools, if it doesn't have too much impact on the other milestones of the project