Capitalise from "zustand" to "Zustand" #3358
-
|
Swiss/German here. Just learning and trying your awesome library for first time. In German language, all nouns are capitalised. Curious here why it's still in lowercase? Just a small nitpick 😅 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Fun example: So you spell React properly but not zustand which should be Zustand? 🤔 |
Beta Was this translation helpful? Give feedback.
-
|
We used to prefer zustand but recently using Zustand. I don't think we should be too strict about it.
So, to answer the question, both are correct as the library name, not as the German word. Same for |
Beta Was this translation helpful? Give feedback.
-
|
It's great to see you exploring Zustand for the first time, and thank you for the interesting observation regarding capitalization in the German language! In the case of library names like "zustand" or "jotai," the preference for lowercase is a common convention in the JavaScript ecosystem, where package names are typically written in lowercase to maintain consistency and simplicity in imports and usage across different projects. However, if you prefer to capitalize "Zustand" for aesthetic or personal reasons, you can definitely customize it when importing the library using an alias or renaming the import in your code. Here's a simple example using Zustand with a capitalized alias: import { createState } from 'zustand';
// You can create a capitalized alias for convenience
const Zustand = createState;
// Now you can use Zustand instead of createStateBy using this approach, you can maintain the readability and aesthetics you prefer while still leveraging the power of Zustand in your projects. Hope this helps! If it solves your issue, could you please mark this comment as the answer? It helps others find the solution faster. 🙏 |
Beta Was this translation helpful? Give feedback.
It's great to see you exploring Zustand for the first time, and thank you for the interesting observation regarding capitalization in the German language!
In the case of library names like "zustand" or "jotai," the preference for lowercase is a common convention in the JavaScript ecosystem, where package names are typically written in lowercase to maintain consistency and simplicity in imports and usage across different projects.
However, if you prefer to capitalize "Zustand" for aesthetic or personal reasons, you can definitely customize it when importing the library using an alias or renaming the import in your code. Here's a simple example using Zustand with a capitalized alias: