-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Ok, so the default in the context is not as necessary. All right, yeah I guess there's not really any real harm in having it, other than that there's an implicit default in the Table and an explicit one in the context.
Originally posted by @ismay in dhis2/ui#211 (comment)
I think it would be nice to provide defaultProps for our boolean flags. Right now they're implicitly false as not providing them leaves them undefined.
Providing them increases the coding overhead slightly. But reading the code and its intention is easier, it's type-safe (as we'd not be using undefined but false) and doesn't cause confusion when used together with react's context as that one expects a default value