preact icon indicating copy to clipboard operation
preact copied to clipboard

`Component.render`'s `props` and `state` parameters should not be optional

Open b-gyula opened this issue 4 years ago • 2 comments

Reproduction

Component.render's props and state parameters are great and very convenient, but it should not be optional, since both this.props and state are defined for every Component. If it's not really necessary to call it without parameter, the typescript definition shall not be define it as optional. (Component.props and state properties are not defined optional)

Steps to reproduce

Expected Behavior

Component.render's props and state should not be optional

Actual Behavior

Component.render's props and state parameters optional

b-gyula avatar Mar 18 '20 20:03 b-gyula

Properties that have initial values should be optional

jeremy-coleman avatar Apr 13 '20 16:04 jeremy-coleman

@marvinhagemeister Is this issue still relevant? Can I work on this?

imrishabh18 avatar May 04 '21 20:05 imrishabh18