-
Notifications
You must be signed in to change notification settings - Fork 36
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 example for how to use react hooks to get the context #165
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
egucciar
approved these changes
May 25, 2022
I'm working through the backlog of GitHub Issues and PRs. Thanks for hanging in there with us. Please sign the Contributor License Agreement (CLA) outlined in CONTRIBUTING when you get a second. Thanks. |
@egucciar Thanks for the review 😄 |
@mikechu-optimizely done |
mikechu-optimizely
added a commit
that referenced
this pull request
Aug 28, 2023
I'm rolling this into #210 (which I dislike having become a hodgepodge of commits) I need to end the madness shortly here. |
mikechu-optimizely
added a commit
that referenced
this pull request
Sep 22, 2023
* Remove devcontainer comments * Testing bug bash devcontainer config * Remove the separate dev container conf * Add setup & exec as npm scripts * Use LF by default when in devcontainer * Update jest config * Update JS SDK via yarn.lock * Convert to TS for bug bash * Prompt for SDK key for the bug bash * Ignore the .env file * Enhance setup.sh * Conditionally npm * Change back to scripty .js * Add boilerplate React bug-bash/app * Update setup.sh to install + run React app * Update npm script to run bug-bash * Simplify setup.sh * Simplify the react app * WIP: Update App + use local @optimizely/react-sdk * Add local React & dotenv * Update setup script * Remove dotenv * WIP bring .env values in * Complete WIP on reading SDK from .env * Transfer @rafinutshaw-optimizely's work in * Small style fix * Minor semantic HTML changes * A bunch'o NITs for my comfort * Rename bug-bash setup & add run * Ensure shell scripts use LF line endings * WIP testing & refactoring tests * Better doc & UI + Refactors * Move Decision; Finish refactor existing tests * Add more tests based on spreadsheet\ * Add sendOdpEvent tests * Last bits of documentation * Update to use js sdk 5.0.0-beta4 * WIP test updates * Update path to logging due to re-organized JS SDK * Update bug bash to package-lock.json * Add @types/uuid 🤔 * Use /lib/ instead of /dist/ from JS SDK * Reset for other bashers * Add more documentation * Upgrade vulnerable tough-cookie to v4.1.3 * Add "repository" field to package.json Thanks @iamstarkov * Add `useContext` documentation from... @raphaeleidus in #165 * Add EOF lines * Remove React.StrictMode * Remove Vite icon ref * Add decision button to change userId * Remove variationKey validation * Upgrade to JS SDK 5.0.0-beta5 * Fix references to remove /lib * WIP: Fixing getLogger ref from JS 5-beta5 * Explicitly optimizeDep-endcy JS SDK * Export OptimizelySegmentOption from JS SDK * Use OptimizelySegmentOption from React SDK export * Update bug bash package-lock * Remove optimizeDeps from viteconfig * Add test comment * Changed optimizelyClient init location in BB app * Add VSCode launch.json * Add conditional to auto fetchQualifiedSegments * Format .vscode files * Leave out tough-cookie dep * Minor clean ups * Update package-json * PR review change * Remove bug bash app * Refinement of PR request WIP Fix tests that fail if dataReadyPromise resolves success=false * PR correction * Remove VSC lauch.json since no bug-bash --------- Co-authored-by: Mike Chu <mike.chu@optimizely.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are examples for getting the client from the context with the
withOptimizely
HOC but there isn't an example on how to use react hooks to do the same thing.