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

fix/tolerant providers #683

Merged
merged 7 commits into from
Sep 6, 2023
Merged

Conversation

stevejpurves
Copy link
Collaborator

Previously, attempting to use provider hooks such as useThebeServer in a react application meant that the respective provider always has to be rendered higher in the component tree. This meant these could not be conditionally rendered based on site settings and instead an exception was thrown.

hooks no longer throw but return empty or uninitialised objects instead, this allows for much more flexibility in a consuming application and avoid hard failures caused by exceptions which were bad for both DX and UX.

@stevejpurves stevejpurves added the thebe-react Applies to the thebe-react package label Sep 4, 2023
@stevejpurves stevejpurves self-assigned this Sep 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

PR Preview Action v1.4.4
Preview removed because the pull request was closed.
2023-09-06 13:24 UTC

* 📡 add check call for user server
* 👮🏻 prevent reconnect for existing server
* 📕 changeset
@stevejpurves stevejpurves changed the base branch from main to feat/extend-binder-url September 6, 2023 13:17
@stevejpurves stevejpurves merged commit 6929b35 into feat/extend-binder-url Sep 6, 2023
2 of 3 checks passed
@stevejpurves stevejpurves deleted the fix/tolerant-providers branch September 6, 2023 13:18
stevejpurves added a commit that referenced this pull request Sep 6, 2023
* add binder urls
* server holds url set for binder
* user server url has meaning outside of binder
* fix/tolerant providers (#683)
* 🔧 use correct binder repo url
* 🫴🏼 hooks no longer throw on undefined contexts
* 📕 changeset
* allow custom repoproviderspecs to be added to react server provider
* 🥁don't provide np-ops
* 🙅🏽 throw exception for malformed RepoProviderSpec
* fix/server blatting (#685)
* 📡 add check call for user server
* 👮🏻 prevent reconnect for existing server
* 📕 changeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
thebe-react Applies to the thebe-react package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant