-
Notifications
You must be signed in to change notification settings - Fork 19
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
chore: rn sdk use localstorage for bootstrapping #326
chore: rn sdk use localstorage for bootstrapping #326
Conversation
…ore tests for synchronization.
…n check for patch and delete. added test for inExperiment.
…nges. add patch and delete unit tests. mock streamer now supports patch and delete commands.
… infinite loop when flag is deleted.
This pull request has been linked to Shortcut Story #225809: Use localstorage for bootstrapping rn sdk. |
@@ -44,6 +44,7 @@ | |||
}, | |||
"dependencies": { | |||
"@launchdarkly/js-client-sdk-common": "0.0.1", | |||
"@react-native-async-storage/async-storage": "^1.21.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this now since AsyncStorage is removed in 0.73.
|
||
export default class ReactNativeLDClient extends LDClientImpl { | ||
constructor(sdkKey: string, options: LDOptions = {}) { | ||
const logger = | ||
options.logger ?? | ||
new BasicLogger({ | ||
level: 'info', | ||
level: 'debug', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intentionally left this as debug
for the alpha.
… unused apis and options.
@@ -1,4 +1,4 @@ | |||
export type EventName = 'connecting' | 'ready' | 'error' | 'change'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you keeping a list of breaking changes for when we do a js-client release? Things like this seem like they could be easy to slip through the cracks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to submit a follow up PR to update all comments, readme and docs including breaking changes. I want to get the code reviewed asap first. The connecting
event is updated to initializing
though to follow @cwaldren-ld 's spec.
This implements feedback from #326. * Run synchronization logic for all `change` events. * Removed `ready` event and use `change` instead. * Callback argument for `change` is now just a string array of flag keys. * Removed config options `stream` and `useReport` for now for this alpha.
…ndependent yarn project.
Implement tombstoning based on feedback frrom #326.
Please run the example app as well if you can by running
yarn ios
from thereact-native
folder. Note that expo 49 only supports rn 0.72. Expo 50 will work with 0.73 and it's in beta with full release coming in about month. Thank you for reviewing.