react-rails icon indicating copy to clipboard operation
react-rails copied to clipboard

Change the default behaviour of Camelized props

Open BookOfGreg opened this issue 7 years ago • 0 comments

  • [x] I have another issue to discuss.

In #409 we allowed an opt-in config to change from snake_case to camelCase. In #556 we exposed the function externally incase it needs to be used.

I believe it may be time to switch to camelCase as the default, this is because the generator makes camelCase components.

$ rails g react:component post snake_case:string
#      create  app/javascript/components/Post.js
propTypes: {
    snakeCase: PropTypes.string
  }

This would be part of a v3 release due to breaking backward compatibility if we chose to go for it.

BookOfGreg avatar Nov 03 '17 22:11 BookOfGreg