Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percentage is now available by default #32

Closed
ptomasroos opened this issue Mar 10, 2017 · 10 comments
Closed

Percentage is now available by default #32

ptomasroos opened this issue Mar 10, 2017 · 10 comments

Comments

@ptomasroos
Copy link

Lets move the logic in order to speed up parsing
facebook/react-native@3f49e74

@vitalets
Copy link
Owner

@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.

@X-Tender
Copy link

X-Tender commented Apr 5, 2017

Could it be currently used with the underscore syntax? Or are the values there precalculated too?

@vitalets
Copy link
Owner

vitalets commented Apr 7, 2017

@X-Tender could you show a demo what you mean?

@X-Tender
Copy link

X-Tender commented Apr 7, 2017 via email

@vitalets
Copy link
Owner

vitalets commented Apr 7, 2017

Never mind :)

@joemckie
Copy link
Contributor

@vitalets it's worth noting that that commit is tagged 0.44, not 0.43 😄

@vitalets
Copy link
Owner

hi @joemckie thanks for info!
I seems RN team moved this feature from 43 to 44.

@X-Tender
Copy link

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.

@cyrusbowman
Copy link

+1 waiting for this.

@vitalets
Copy link
Owner

vitalets commented Jun 2, 2017

Will try to find time for that on the nearest weekend.
Btw, @X-Tender, is everything goes ok with your workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants