-
Notifications
You must be signed in to change notification settings - Fork 8
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
Decorators are not officially supported yet in 6.x pending a proposal update. #1
Comments
It definitely does not seem to be related to react-policies, as the issue is clearly happening while compiling the code. My advise would be for you to drop the usage of decorators, if it is not working on your build. Your could could be rewritten as follows: const activePolicy = Policy({
test: props => props.expired_days > 0
})
class createButtonActive extends Component {
static propTypes = {
expired_days: PropTypes.integer
}
render() {
return (
<RaisedButton onClick={this.createInvoice} label="Create" primary={true} labelStyle={{fontSize:'12px'}} />
)
}
}
export default activePolicy(createButtonActive) If I have the time, I'll try and simulate the issue locally. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got this error when i try to use your packages :
i have did what the error said, reset app and bundler (I am using webpack), but its not helping. Can you help?
here is my
.babelrc
:my models :
The text was updated successfully, but these errors were encountered: