question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Refactor] Combine Chakra into one main package

See original GitHub issue

What 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:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
cereallarcenycommented, Aug 18, 2020

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.

0reactions
ljosberinncommented, Nov 16, 2020

No, it treeshakes just fine. This is my site in prod for example:

image

You can see only the components that I’m actually using are imported. Would be really horriffic if that wasn’t the case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementing Advanced Component Library using Chakra UI
How to implement a component library, custom theme, and custom components using Chakra UI in React.
Read more >
Build a Project Management App with Remix (with Chance ...
Remix is a new tool for building and deploying fullstack React applications with a keen appreciation for the web's foundations, built by the...
Read more >
Building a photo gallery app from scratch with Chakra UI
We walk you through building a complete photo gallery app with Express and React, and take Chakra UI for a spin for component...
Read more >
wtA - River Thames Conditions - Environment Agency - GOV.UK
Jee main admit card 2014 name wise, Nixon the chronicle black snake! Nord stream race 2013 facebook! Ular weling, 600 sat math to...
Read more >
Refactor main.go to another packages - Stack Overflow
The methods for a type can only be defined in the same package as the type. You cannot define a new method for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found