Closed enceeobee closed 3 years ago
Hello 👋 ,
First, thank you for this package! It's wonderful 😄
I recently noticed that subscribeToChanges always uses a camelCase flag key when updating the store, even when useCamelCaseFlagKeys is set to false.
subscribeToChanges
useCamelCaseFlagKeys
false
I don't think the fix should be too difficult, and I can probably supply a PR for it soon, but I wanted to open an issue for posterity.
init ld-redux setting useCamelCaseFlagKeys to false
ldRedux.init({ clientSideId: 'your-client-side-id', dispatch: store.dispatch, useCamelCaseFlagKeys: false });
Later, identify a new user, which will dispatch an event(s) to update the store once the new flag values are ready
window.ldClient.identify({key: 'someUserId'});
Observe that the flag key in the SET_FLAG action is incorrectly sent in camelCase (e.g. 'my-kebab-case-flag' is updated as 'myKebabCaseFlag')
'my-kebab-case-flag'
'myKebabCaseFlag'
Here's an example of a flag being updated in camelCase, when it should be kebab-case
The fix for this has been merged and released in v3.3.4.
Hello 👋 ,
First, thank you for this package! It's wonderful 😄
Issue
I recently noticed that
subscribeToChanges
always uses a camelCase flag key when updating the store, even whenuseCamelCaseFlagKeys
is set tofalse
.I don't think the fix should be too difficult, and I can probably supply a PR for it soon, but I wanted to open an issue for posterity.
Steps to reproduce
init ld-redux setting
useCamelCaseFlagKeys
tofalse
Later, identify a new user, which will dispatch an event(s) to update the store once the new flag values are ready
Observe that the flag key in the SET_FLAG action is incorrectly sent in camelCase (e.g.
'my-kebab-case-flag'
is updated as'myKebabCaseFlag'
)Screenshots
Here's an example of a flag being updated in camelCase, when it should be kebab-case