Skip to content
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

🎉 Including SolidJS and Vue3 support #151

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft

Conversation

luiguild
Copy link
Member

@luiguild luiguild commented May 28, 2024

Just a simple port from the actual react plugin to SolidJS and Vue3.

This port includes:

  • BasedProvider - Component to be used as wrapper injecting the BasedClient in the app's context.
  • useBasedClient - Hook to get the server context (just for Solid, Vue use inject(BasedContext.CLIENT)
  • useBasedQuery - To send queries to Based
  • useBasedStatus - To check the connection with the Based server
  • useBasedAuth - To get the authorization information from the user connected
  • Rewrite the React API to be the aligned with the Solid and Vue implementations

Alt Text

@luiguild luiguild requested review from jimdebeer and youzi May 28, 2024 14:58
@youzi
Copy link
Contributor

youzi commented May 28, 2024

@luiguild I see you renamed the hooks (also in the react package). Why?

If we decide to do this, we probably want to expose the old ones as well for backwards compat

@luiguild
Copy link
Member Author

@youzi the README on the react side was a mistake, I was using find & replace in the IDE and didn't checked well, I'll revert it!

About the names, this is just a suggestion that I want to get your opinions about. Thinking exclusively in our case and our products, the current names do not represent any problem and we don't need to change. My idea with these new names is to add a little bit more scope to the imports, making it clear that they are hooks/components exclusively for consuming content from Based, independent of anything else similar that someone might want to use in other projects. I believe that reinforcing our name in imports is important.

And yes I agree if we decide to move on with this new names we need to expose the old ones for sure!

luiguild and others added 17 commits May 28, 2024 17:52
…ents.

* Fixing typo on cache.ts
* Including all aliases to be backwards compatible
* Pushing the new README to the SolidjS package
…ents.

* Fixing typo on cache.ts
* Including all aliases to be backwards compatible
* Pushing the new README to the SolidjS package
* Fixing some imports
* Changing the root id element to the solid test application from "root" to "app"
* Bumping the version of the saulx/tsconfig
* Fixing some things on the tsconfig from react and solid
* Fixing the Readme and including the new component documentation
* Including deprecation mark to the old methods/hooks
…s, demo fixed and renaming the hooks to use camelCase also in the filenames
@luiguild luiguild changed the title Including SolidJS support 🎉 Including SolidJS and Vue3 support 🎉 Jun 4, 2024
@jimdebeer
Copy link
Contributor

Really cool stuff!

…to follow the best practice of Solid, fixing README and a typo on BasedProvider
@luiguild luiguild changed the title Including SolidJS and Vue3 support 🎉 🎉 Including SolidJS and Vue3 support Jun 27, 2024
…shows the Based.io connection status, Changing BasedProvider.tsx to handle the BasedLiveStatus.tsx option, including vite types on tsconfig.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants