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

feat(solid): Implement solid playground and core hooks #1947

Closed
wants to merge 72 commits into from

Conversation

NeOMakinG
Copy link

Description

  • Added a new package called @wagmi/solid containing reactivity for solid and some account hooks
  • Added a new playground using solid base starter in order to test solid hooks
  • Added tests for the core hooks

⚠️ We encountered an error while using solid start, not happening when using the default solid starter:

TypeError: Class extends value undefined is not a constructor or null at /references/packages/connectors/src/base.ts24:10

After investigating, it looks like EventEmitter from connectors/base.ts is undefined while using SSR with solid-start on the nodejs side, we actually can't figure out why it's working with next for the moment but not with solid start, so we did switch to the regular solid starter using vite 4 and it works perfectly

@gabrieldemian

Current core hooks implemented

  • useAccount
  • useConnect
  • useContract
  • useDisconnect
  • useNetwork
  • useProvider
  • useSigner
  • useSwitchNetwork
  • useWebSocketProvider

Additional Information

Your ENS/address:
0xm4king.eth / 0xfd42860cD619FE2060712DC5833F0B039b23e00a

@changeset-bot
Copy link

changeset-bot bot commented Mar 4, 2023

⚠️ No Changeset found

Latest commit: fff7857

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Mar 4, 2023

@gabrieldemian is attempting to deploy a commit to the wagmi Team on Vercel.

A member of the Team first needs to authorize it.

@NeOMakinG
Copy link
Author

@gabrieldemian I had to open a new PR because we can't change the base branch

@NeOMakinG
Copy link
Author

@tmm for references: #1677 (comment)

@socket-security
Copy link

Socket Security Pull Request Report

Dependency issues detected: If you merge this pull request, you will not be alerted to the instances of these issues again.

📜 Install scripts

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Package Script field Source
esbuild@0.14.54 (added) postinstall examples/solid/package.json via solid-devtools@0.26.0
esbuild@0.15.13 (added) postinstall package.json via esbuild-register@3.4.2, examples/_dev/package.json via @wagmi/cli@0.1.11, packages/cli/package.json via bundle-require@3.1.2, packages/cli/vhs/package.json via @wagmi/cli@0.1.11
esbuild@0.15.18 (added) postinstall examples/solid/package.json via solid-devtools@0.26.0, vite@3.2.5, vite-plugin-solid@2.6.1
esbuild@0.16.17 (added) postinstall package.json via @vitest/coverage-c8@0.25.8, vite@4.1.4, vitest@0.25.8, packages/solid/package.json via vite-plugin-solid@2.6.1, vitest@0.25.8
esbuild@0.17.11 (added) postinstall package.json via tsup@6.6.3
Pull request report summary
Issue Status
Install scripts ⚠️ 5 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues
Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore esbuild@0.14.54
  • @SocketSecurity ignore esbuild@0.15.13
  • @SocketSecurity ignore esbuild@0.15.18
  • @SocketSecurity ignore esbuild@0.16.17
  • @SocketSecurity ignore esbuild@0.17.11

Powered by socket.dev

@tmm
Copy link
Member

tmm commented Mar 20, 2023

Thanks for pushing this along everyone! Going to mark as a draft for now.

Once wagmi@1 is out (switching from ethers to viem and a few other nice updates), will make sure this gets a proper review and release.

@tmm tmm marked this pull request as draft March 20, 2023 20:53
@NeOMakinG
Copy link
Author

Thanks for pushing this along everyone! Going to mark as a draft for now.

Once wagmi@1 is out (switching from ethers to viem and a few other nice updates), will make sure this gets a proper review and release.

Nice to get some news there, keep us in touch, can't wait ✌️

@NeOMakinG
Copy link
Author

@tmm Are we ready to rebase, fix and review this?

@tmm
Copy link
Member

tmm commented Aug 31, 2023

Appreciate you all working on this! There are some updates on the alpha branch that will make adding additional framework adapters much easier. Once the next major version of Wagmi is released, we can work on getting this in.

@tmm tmm closed this Aug 31, 2023
@glitch-txs
Copy link
Collaborator

any updates on this? 👀

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.

4 participants