-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
reworked types, methods now on useStore #44
reworked types, methods now on useStore #44
Conversation
Sweet, thanks for this! In v2, I went a similar route like this: My other concern is that this PR introduces breaking API changes, so I could release this as a beta npm package in the interim before v2 is released rather than release v1.7.0. What do you think? |
I think Totally makes sense to release as a beta version! Let's make sure we're matching on API at least, so a choice between |
Okay, the only other potential clash would be multiple middleware using the same I prefer No need to update the stories. They will have a major overhaul. The progress of v2 can be found on this branch. I've opted to use TDD instead of storybook to drive the development. Would you want to help cross off some features? I can provide a better description of each bullet point. Right now they just make sense in my head. |
The only other word I can think of is I can take a look at devtools support for v2 (e.g. named actions) |
This makes sense but it could be quite nice to have one story/runnable page to test things like Redux devtools. Otherwise it's a bit of a pain to link the library locally to another local repo. |
I like the word Thanks for being willing to look at dev tools!
I don't have storybook set up, but I do have a way to testing the library visually. I'm re-structuring the repo in v2, but haven't added storybook back yet. Basic ways to test:
The The branch should be in a working state. I'm working on the history depth limit and am fixing a couple bugs regarding when the store should clear. So sorry the development environment isn't in a good spot yet, so I completely understand if you want to wait. My goal is to have the repo cleaned up by the end of the weekend. |
With this current PR #44, are you wanting me to release a beta for you to use before v2 is done? Just let me know. Thanks! |
Thanks for all this info! Very useful. Currently I am just linking to that branch as a package and so don't really need this as a release (or even this draft PR). I will keep this PR open just in case that fails for some reason. I will close it when all is confirmed and working well. |
Sounds good. Thanks for the updates and the help. |
So actually it might be useful for us if you could publish this PR as a beta. Unfortunately our CI is failing when trying to pull the package from my Github branch, no idea why. It should be known that this branch is definitely a bit of a mess though! |
Sounds good. Thanks for all the work, @funwithtriangles. I'll give it a review after my work day. Thanks for the patience! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great. And I'll release a temporary version for you.
I'll wait to merge this in for now.
This has been released as v2.0.0-experimental.0. Thank you for the help! You can install with |
Amazing, thanks! |
So I was reworking the types (#42) which lead me to some other changes (e.g. having
undo
,redo
, etc, live as static methods (e.g.useStore.zundo.undo()
)Not sure if this is the direction you want to go in (or if it clashes with all the stuff you've done with v2) but thought I'd put this up here as a draft.
Currently all stories are broken except for "other middlewares", where you can see the new API