Allow primitivies without default values

Summary:
It's not needed to keep required providing default values even if they are not actually relevant.

Here I add a support for `null`, `0` of `false` instead by default and remove throwing errors if no other default value provided.

Reviewed By: rubennorte

Differential Revision: D16049047

fbshipit-source-id: bc4961af3873190568f2753fc4ec975354896df5
This commit is contained in:
Michał Osadnik
2019-07-01 07:51:25 -07:00
committed by Facebook Github Bot
parent 0f83dfab8e
commit 75d01075d4
9 changed files with 28 additions and 55 deletions
@@ -22,7 +22,7 @@ type NativeProps = $ReadOnly<{|
//Props
styleAttr?: string,
typeAttr?: string,
indeterminate: WithDefault<boolean, true>,
indeterminate: boolean,
progress?: WithDefault<Float, 0>,
animating?: ?WithDefault<boolean, true>,
color?: ?ColorValue,