yusinto / ld-redux

A library to integrate launch darkly with react redux
MIT License
34 stars 17 forks source link

[FEATURE REQUEST] Allow camel casing to be turned off #39

Closed gkadillak closed 2 years ago

gkadillak commented 4 years ago

Hello! First of all, loving the library. It fills a real need that we've had in our codebase and the source for it is dead simple. However, when refactoring code to use this library, renaming each flag from dashes to camel case was burdensome and error-prone. It would be great if there was a way to keep the flags as dash-cased on init. One idea I had was to add another option in the init method:

ldRedux.init({
  clientSideId: 'your-client-side-id',
  camelCase: false,
  dispatch: store.dispatch,
  flags,
});

I'd be more than happy to put up a pr for this feature myself. What are your thoughts on this approach?

yusinto commented 4 years ago

Sounds good! Please put up a pr if you can and I'll take a look. Thanks for submitting this.

gkadillak commented 4 years ago

pr here @yusinto: https://github.com/yusinto/ld-redux/pull/40

gkadillak commented 4 years ago

@yusinto have you taken a look at this pr yet?

yusinto commented 2 years ago

This was merged in #40 . Closing now.