[change] StyleSheet.compose() deprecation

Encourage use of existing array syntax for multiple styles. Eventually
we'll want to remove the compose() API to simplify the overall styling API.
This commit is contained in:
Nicolas Gallagher
2022-08-26 12:17:21 -07:00
committed by Nicolas Gallagher
parent 9868738604
commit fc0d84fba4
10 changed files with 18 additions and 34 deletions
@@ -44,11 +44,7 @@ Equal to 1px. This is not implemented using screen density as browsers may round
### Static methods
{% call macro.prop('compose', '(style1, style2) => Style') %}
Combines two styles such that the last style overrides properties of the first style. If either style is falsy, the other one is returned without allocating an array, saving allocations and maintaining reference equality.
{% endcall %}
{% call macro.prop('create', '({ [key]: ruleset }) => ({ [key]: number })') %}
{% call macro.prop('create', '({ [key]: ruleset }) => ({ [key]: ruleset })') %}
Define style objects. Each key of the object passed to `create` must define a style object. These values should not be introspected at runtime.
{% endcall %}