-
Notifications
You must be signed in to change notification settings - Fork 30
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
[QUESTION] Eliminate unnecessary dependencies #78
Comments
These dependencies are all required to make chakra-react-select work. If you have |
i have installed chakra before and i see all the components you requested are included in this package except for the icon. I installed your package and got the message that those dependencies are not there yet. not a mistake, i agree that you can use the main package instead of the individual packages |
The What version of the npm cli are you using? Because from version 7 onward, peer dependencies should be installed automatically. In addition, if you have @chakra-ui/react installed, the common dependencies between that and this package will be de-duped. |
yarn v1.22.18
my solution: const AsyncSelect = dynamic<any>(
() => import('chakra-react-select').then((e) => e.AsyncSelect),
{ ssr: false }
); Can you suggest any type in any type to help me? |
Ah so maybe it's an issue with the way yarn does peer dependency installations vs the npm cli. I switched from having I can look into how yarn is affected by this change as well, as I'd prefer to keep the installation as simple as possible for the majority of users. For the next question, I assume you're talking about a Next.js application, where the automatically generated IDs from <AsyncSelect instanceId="async-select-instance" /> Here's the relevant section from the react-select docs:
It's good to note that this warning isn't a breaking bug, and your app will run fine, but it can have performance implications. In some cases you can also get this error from Chakra elements which have automatic ID generation such as the form control, as seen in these issues:
If you are still having the issue and you are wrapping your select in a <FormControl id="my-async-select">
<FormLabel>My Async Select</FormLabel>
<AsyncSelect instanceId="async-select-instance" />
</FormControl> And lastly, when you say "background property is not available" I'm not sure where you mean. You can use the <AsyncSelect
chakraStyles={{
control: (provided) => ({
...provided,
background: "blue.100"
})
}}
/> |
To give a conclusive answer to the start of this post, there is nothing I can do about those installation warnings. If you have |
Scratch my last comment, there is something I can do, and I just did it in |
I use the package @chakra-ui/react and it contains all the packages that I get the warning message
can you remove them in upcoming updates
The text was updated successfully, but these errors were encountered: