-
Notifications
You must be signed in to change notification settings - Fork 4
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
Evangelism ideas #6
Comments
Hey Sesam, thanks for your time.
Hmm do you have an example of this?
What would this replace do you mean? I remember the redux burnout the community faced in 2015-2016, where everyone would put state their redux stores, even if it didn't belong there (server cache, hover state, etc). I think we need to be precise about the objective of klyva, and rather not see people using it as a server cache or similar. (
That's interesting, I'd gladly try this out. A new version of |
@merisbahti @sesam along these same lines, I think it would be really helpful to have a comparison with other React state-management tools. Jotai has this page -- it's not super thorough but it's something. You have a brief blurb at the end of the README right now, but given how critical state management is to an app, more guidance as to where klyva is a good fit would be great (whether in terms of front-end architecture, performance, or other criteria). |
Hmm ok; I see. What would be nice to see in such a page? I was thinking maybe a small todo-application? |
Sure, I think a small sample app would be great. But even just having a brief discussion of pros and cons vis-à-vis other similar state management libraries would be very useful. |
Ok so I've been thinking about this and you're definitely right, I started with atleast making a codesandbox here: https://github.com/merisbahti/klyva (scroll down to the useAtomSlice example). Do you think this is too much? I wanted to be sure to show usage of |
Nice, I think the examples are great. Though I was thinking more high-level conceptual explanations, and how to approach state management with klyva in terms of front-end architecture in a real app. For example, right now, the README gives a brief description and then jumps right into "How to create an atom" without describing what atoms are or why you might want to use them for state management. It's also billed as state management for React, but React is not mentioned again until two pages down. Maybe "How to" should be titled "Basics" or "Building Blocks" or something like that, to indicate this is about the core concepts? Then I think the React section itself hits one of the biggest challenges in explaining state management: finding the right balance between realistic examples and something that will fit in a README. Right now, the Also, if the atoms are essentially global state, how do you handle testing--specifically avoiding components stomping over each other's state during unit tests? Zustand has some discussion in pmndrs/zustand#242 but it feels like an afterthought. Are there best practices for that with klyva? Maybe this is too much for a README, but I think clarifying some of these high-level concepts would be very useful. |
Nice! One possibility for a code example could be something like https://github.com/getify/A-Tale-Of-Three-Lists if the middle list would be composed of the list-atoms of the left and the right. Change right atom, and right and "merged" list updates. Or maybe you can extract some simplified example from the codebase where you've already used klyva? |
Also, for clarity it might be good to split up some ideas here into their own tickets. Testing seems very important and probably has to be "well baked" before klyva can see wider adoption, so let's gather testing dream-scenarios in #12 and then figure out if those dreams can come true. Just keeping track of the next smallest step in the right direction. |
Great ideas! Regarding testing simon has created an issue here where I answer: I've reordered the README now to focus on react. But we'll definitely have to make a dedicated docs folder for more advanced discussions, like architecture, which really is what klyva wants to solve. I might even make a video tutorial if I get the courage!
Ooh really cool start, I'm not super visual like that, but I'll try to make the README a bit prettier, and like you say, mobile friendly. |
To capture the interest of developers, it would be beneficial if:
import
line, and "one line" changes in the actual code to use this library instead of whatever was in use before.(We discussed this on Discord, and I plan to update this more a bit later)
The text was updated successfully, but these errors were encountered: