[Refactor] Combine Chakra into one main package
See original GitHub issueWhat problem does this feature solve? So, I totally agree that each of the components need to be exported as individual packages, but I’m kinda curious if we need to have some other packages as distinct from the core.
What does the proposed API look like?
I feel that we could combine the following packages into the main core
package:
styled-system
system
test-utils
utils
We should also combine the theme-tools
into the theme
package.
Describe alternatives you’ve considered Honestly, it’s a bit of a pain to have no idea where a given function is coming from. This makes development and contributing a bit of a pain. To make this harder, there’s no API reference for this either. Rather, we could forego that step and just say that everything is defined in the component itself, the theme package, or the core package… that’s it. Plus, we already support tree-shaking, so I’m not aware that there’s a particular reason to separate packages as much as we are - it just makes things harder to follow. 😃
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
I think I get what you mean. For now, it’s just very difficult to understand where various theming related functions exist:
useStyleConfig
,styleConfig
,StylesProvider
,useStyles
, etc.No, it treeshakes just fine. This is my site in prod for example:
You can see only the components that I’m actually using are imported. Would be really horriffic if that wasn’t the case.