-
-
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
Add solid adapter #6
base: main
Are you sure you want to change the base?
Conversation
|
@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 |
The create vs use naming convention is interesting. In TanStack Table, Virtual, and Form, we've used "create" for both solid and svelte. I didn't realize that Query and router were using "use" |
Svelte 4 used |
@birkskyum I find myself mostly agreeing with Ryan's naming convention, but it's not a hill I'd die on. I respect your opinion here with your background for sure. Consider this though (potentially). React might be the only framework adapter for pacer that even needs a Maybe for all other frameworks, we just direct devs to use But then, we can also provide "hooks" like |
Fair enough, I've update the api and the docs to |
This sets up the solid-pacer package, and examples, and docs