Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Support decorators #42

Open
JAStanton opened this issue Apr 13, 2017 · 0 comments
Open

Support decorators #42

JAStanton opened this issue Apr 13, 2017 · 0 comments

Comments

@JAStanton
Copy link

Instead of having to always remember to do this:

styles = dapper.reactTo(this, STYLES);

It would be nice to just have this:

@dapper({
  root: {
    $highlight: {
      backgroundColor: '#FFF',
    },
  },
}, {
  highlight: ({ props }) => props.highlight,
})
class MyComponent extends Component {
  
  render() {
    return (
      <View className={this.styles.root} />
    );
  }
}

I understand it may disagree w/ TypeScripts but I could see the argument for added ergonomics for non-TypeScript projects.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant