-
-
Notifications
You must be signed in to change notification settings - Fork 30
Add solid adapter #6
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
Conversation
🦋 Changeset detectedLatest commit: de8e88c The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@KevinVandy , can you see what the problem is for eslint here that make the test suite fail? |
|
Great PR. Don't know if you saw in this repos history, but I started out with a Solid adapter before I temporarily removed it a couple weeks ago to speed up the initial development. 8debd03 Your contribution is going to speed up the process a lot |
|
All package.json's need to have a unique package name in the monorepo, or else pnpm i and pnpm build will probably fail. The solid examples still seem to have the react examples' names. |
| TFn extends (...args: Array<any>) => any, | ||
| TArgs extends Parameters<TFn>, | ||
| >(fn: TFn, options: AsyncDebouncerOptions) { | ||
| const [asyncDebouncer] = createSignal( |
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.
back when I was experimenting with making my own solid adapter, I think I had discovered that most of the code in the solid adapter would be unnecessary. Like it could be as simple as createAsyncDebouncer = () => new AsyncDebouncer(options)`
|
@KevinVandy there is something working here - not all, but quite a lot. If we merge this, there will be docs, and we can easily browse the examples and fix the remainder. |
|
I've removed the dependency arrays from memo/effect - maybe the Callback versions aren't necessary at all for solid, since the useCallback isn't there. |
|
I'll check out the PR and clean up som stuff. I'd like it to be mostly correct / on the right path before merging, or at least before releasing. We can merge and not release, but might as well work in this branch for a bit. |
|
Sounds good - I imagine there are quite a few lambda wrappers that can be removed. |
|
I added 1 commit in the solid throttler area where I renamed and refactored some things to go in the correct direction. I won't be able to work on this again till tomorrow if you or someone wants to pick up the work again.
|
|
i opted for keeping the api surface intentionally, since it makes the docs easier to maintain, and they redirect correctly when you switch framework there - the |
|
@birkskyum Pretty happy with the refactors I've done here. Would love for you to take a look. The solid adapted hooks now keep mirror state in signals now, so they are effectively reactive. Solid devs should not need to manually use the What's left to do in this PR?
|
|
I need to update the changeset to document all the changes to pacer and react-pacer, but otherwise, this will be good to go tonight. |
This sets up the solid-pacer package, and examples, and docs