Percentage is now available by default
ptomasroos opened this issue · comments
Lets move the logic in order to speed up parsing
facebook/react-native@3f49e74
@ptomasroos thanks for sharing.
I think we should wait for RN 43 to get released and when make major release to let people keep using lib on earlier versions of RN.
Could it be currently used with the underscore syntax? Or are the values there precalculated too?
@X-Tender could you show a demo what you mean?
Never mind :)
hi @joemckie thanks for info!
I seems RN team moved this feature from 43 to 44.
Mmmh no? real percent values are available in RN 0.43. Or waht do you mean? :)
I fooled a bit around and changed
tryCalcPercent(str) {
if (percent.isPercent(str)) {
return percent.calc(str, this.prop);
}
return null;
}
to:
tryCalcPercent(str) {
if (percent.isPercent(str)) {
return str;
}
return null;
}
in value.js
and it worked out of the box. The question is just, change the % behavior there and make it maybe a breaking change or combine it with some kind of additional property.
+1 waiting for this.
Will try to find time for that on the nearest weekend.
Btw, @X-Tender, is everything goes ok with your workaround?