Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Example {
- readonly initialState: any
- constructor(){
- this.someMethod()
- }
- private someMethod(){
- this.setState({
- initialState: 'someState' // Cannot assign to 'initialState' because it is a read-only property
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement