Something that needs improvement: Lack of type saf...
# javascript
m
Something that needs improvement: Lack of type safety / initialization with
RProps
. Easy to miss and causes an error at runtime 😅
s
You can pass props as a constructor parameter if you need it in
init {}
.
Copy code
class Component(
        _props: ComponentProps
) : RComponent<ComponentProps, RState>(_props) {
}
And dont call it
props
or your usages in init will grab the initial constructor parameter and not the
props
property