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

docs: Add React Hooks section #622

Merged
merged 3 commits into from
Oct 17, 2024
Merged

docs: Add React Hooks section #622

merged 3 commits into from
Oct 17, 2024

Conversation

germartinez
Copy link
Member

Context

This PR:

  • Merges development into main branch.

Content:

  •  React Hooks overview
  • React Hooks reference
  • React Hooks guide
  • Update deprecated methods

Copy link

github-actions bot commented Oct 17, 2024

Branch preview

✅ Deployed successfully in branch deployment:

https://development--docs.review.5afe.dev

Copy link

github-actions bot commented Oct 17, 2024

Overall readability score: 32.39 (🟢 +0.45)

File Readability
createconfig.mdx 51.32 (-)
overview.mdx 42.08 (-)
safeprovider.mdx 45.15 (-)
useconfirmtransaction.mdx 36.09 (-)
usesafe.mdx 0 (-)
connect.mdx 4.68 (-)
disconnect.mdx 1.49 (-)
getbalance.mdx 67.12 (-)
getchain.mdx 3.18 (-)
getpendingtransactions.mdx 67.25 (-)
getsafeinfo.mdx 67.52 (-)
getsigneraddress.mdx 2.62 (-)
gettransaction.mdx 65.54 (-)
gettransactions.mdx 67.37 (-)
isinitialized.mdx 15.97 (-)
isownerconnected.mdx 20.12 (-)
issignerconnected.mdx 20.31 (-)
usesendtransaction.mdx 42.63 (-)
useupdateowners.mdx 10.4 (-)
add.mdx 49.07 (-)
remove.mdx 47.99 (-)
swap.mdx 48.6 (-)
useupdatethreshold.mdx 39.71 (-)
confirm.mdx 18.54 (🟢 +4.72)
send.mdx 66.89 (🔴 -0.41)
api-kit.mdx 31.74 (🟢 +0)
protocol-kit.mdx 32.96 (🟢 +0)
react-hooks.mdx 44.12 (-)
send-transactions.mdx 20.91 (-)
relay-kit.mdx 46.54 (🟢 +0)
gelato-relay.mdx 66.67 (🟢 +0)
starter-kit.mdx 52.24 (🟢 +0)
View detailed metrics

🟢 - Shows an increase in readability
🔴 - Shows a decrease in readability

File Readability FRE GF ARI CLI DCRS
createconfig.mdx 51.32 39.23 10.09 14.9 13.56 7.4
  - - - - - -
overview.mdx 42.08 51.18 13 18.4 12.59 8.18
  - - - - - -
safeprovider.mdx 45.15 32.22 11.83 15.2 12.59 8.32
  - - - - - -
useconfirmtransaction.mdx 36.09 25.66 9.38 18.2 18.66 8.09
  - - - - - -
usesafe.mdx 0 0 19 22 19 11
  - - - - - -
connect.mdx 4.68 0 16.27 22 19 11
  - - - - - -
disconnect.mdx 1.49 0 18.13 22 19 11
  - - - - - -
getbalance.mdx 67.12 58.69 8.21 11.4 11.3 7.06
  - - - - - -
getchain.mdx 3.18 0 19 22 19 10.01
  - - - - - -
getpendingtransactions.mdx 67.25 58.48 8.34 11.3 11.24 7.01
  - - - - - -
getsafeinfo.mdx 67.52 58.58 8.23 11.3 11.24 6.99
  - - - - - -
getsigneraddress.mdx 2.62 0 18.95 22 19 10.21
  - - - - - -
gettransaction.mdx 65.54 50.43 8.18 11.7 11.59 6.88
  - - - - - -
gettransactions.mdx 67.37 58.58 8.31 11.3 11.18 7.02
  - - - - - -
isinitialized.mdx 15.97 23.26 15.22 22 18.05 9.66
  - - - - - -
isownerconnected.mdx 20.12 28.67 14.91 22 16.37 9.55
  - - - - - -
issignerconnected.mdx 20.31 27.11 13.19 21.9 18.04 9.64
  - - - - - -
usesendtransaction.mdx 42.63 32.7 9.46 16.9 16.75 7.8
  - - - - - -
useupdateowners.mdx 10.4 0 16.27 22 19 9.22
  - - - - - -
add.mdx 49.07 34.42 8.93 14.5 15.23 7.92
  - - - - - -
remove.mdx 47.99 34.42 8.95 14.8 15.64 7.93
  - - - - - -
swap.mdx 48.6 34.42 8.95 14.6 15.41 7.93
  - - - - - -
useupdatethreshold.mdx 39.71 25.66 9.15 17.3 17.62 7.95
  - - - - - -
confirm.mdx 18.54 23.46 13.86 22 19 9.18
  🟢 +4.72 🟢 +4.06 🟢 +2.74 🟢 +0 🔴 -0.37 🔴 -0.04
send.mdx 66.89 59.09 7.82 11.5 11.93 7.04
  🔴 -0.41 🔴 -1.02 🟢 +0.04 🔴 -0.3 🔴 -0.41 🟢 +0.22
api-kit.mdx 31.74 32.73 14.18 17.2 15.03 9.29
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
protocol-kit.mdx 32.96 37.5 15.08 15 15.08 9.65
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
react-hooks.mdx 44.12 39.67 12.68 15.6 13 8.21
  - - - - - -
send-transactions.mdx 20.91 26.17 18.23 22 14.81 8.09
  - - - - - -
relay-kit.mdx 46.54 53.21 12.2 14.2 13.28 8.92
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
gelato-relay.mdx 66.67 54.42 9.56 10.5 10.79 6.89
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
starter-kit.mdx 52.24 46.47 11.83 12.8 12.82 7.83
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0

Averages:

  Readability FRE GF ARI CLI DCRS
Average 32.39 27.91 13.42 17.64 15.64 8.78
  🟢 +0.45 🟢 +0.26 🟢 +0.15 🟢 +0.02 🟢 +0.01 🟢 +0.03
View metric targets
Metric Range Ideal score
Flesch Reading Ease 100 (very easy read) to 0 (extremely difficult read) 60
Gunning Fog 6 (very easy read) to 17 (extremely difficult read) 8 or less
Auto. Read. Index 6 (very easy read) to 14 (extremely difficult read) 8 or less
Coleman Liau Index 6 (very easy read) to 17 (extremely difficult read) 8 or less
Dale-Chall Readability 4.9 (very easy read) to 9.9 (extremely difficult read) 6.9 or less

yagopv and others added 3 commits October 17, 2024 14:53
* Initial commit

* Add info

* Add more documentation for the useSafe hook

* valve

* Add SafeConfig

* Improve descriptions and snippets

* Update pages/reference-react-hooks/usesafe.mdx

Co-authored-by: Tim <[email protected]>

* Update pages/reference-react-hooks/useconfirmtransaction.mdx

Co-authored-by: Tim <[email protected]>

* Update pages/reference-react-hooks/useconfirmtransaction.mdx

Co-authored-by: Tim <[email protected]>

* Improve some texts

* Update title

* Add `useUpdateThreshold` hook to reference-react-hooks

* Improve text

* Code formatting

* Format code snippets

* Update URL path and folder name

* Add reference for the `useUpdateOwners` hook

* fix: Move useUpdateOwners documentation file to correct folder

* Fix typo

* Improve desciption for config property in UseTransactionParams

* Split useSafe hook

* Format all useSafe function pages

* fix: Import statement for config

* Add code example for `isInitialized` flag

* Add code example for `isSignerConnected` flag

* Add descriptions for `useSendTransaction` and `useConfirmTransaction`

* Added missing reference for `isOwnerConnected` flag

* Improve descriptions for `isSignerConnected` and `isOwnerConnected`

* Format code snippets with values

* Format useSafe hooks

* Rename Safe hooks package

* Turn Vale off in code snippets

* Restructure useUpdateOnwers folders

* Order hooks alphabetically

* Update send and confirm descriptions

* Document all params in createconfig

* Remove SafeConfig type

* Update owners management descriptions and code snippets

* Update descriptions and code snippets

* Update caveats

* Use safeAddress param by default

* Add all useQuery result types

* Add all query mutations result types

* Fix code snippets

* Fix style

* Order params and return sections

* Order hooks

* Fix imports in code snippets

---------

Co-authored-by: Tim <[email protected]>
Co-authored-by: Germán Martínez <[email protected]>
Co-authored-by: Germán Martínez <[email protected]>
The methods mentioned above, such as createRelayedTransaction and executeRelayTransaction, are deprecated.
* Add send transactions guide

* Fix titles in the reference

* Small fixes/typos

* Fix installation

* Add hooks home page

* Adjust styles

* Update SDK sidebar
@germartinez germartinez merged commit 32f6de7 into main Oct 17, 2024
3 of 4 checks passed
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