How can I set the default values of properties in React components when using with Typescript?
I saw from another question on SE that I could declare a static class variable of defaultProps
as an object with its keys my properties, but this doesn't seem to work for me.
Somehow, the static variable defaultProps
wasn't called from anywhere and the properties still don't have their default values.