Live data from Hacker News

Yoga: A cross-platform layout engine

code.facebook.com

101–110 of 168 posts

Re: Yoga: A cross-platform layout engine

#104
post #54

Okay, question: can it perform the following task elegantly? Say, I build a declarative tree describing a layout, and I render it. Now I remove one item from the tree. Can the layout engine efficiently remove the item from the view, and... (now it comes) provide an animation for it? As in, the item slowly losing opacity, then the surrounding items moving closer together? (Or a different animation depending on setting…

Yoga itself does not handle animation but by using another animation system on top of Yoga it should be very possible. I have not yet tried it myself but by wrapping a layout change in a UIView animation block the above should be doable (on iOS but similar should hold on other platforms).

Interesting. Could it be done efficiently? I.e., without walking the complete tree on every update?

Re: Yoga: A cross-platform layout engine

#105

Earlier quoted context omitted.

Maybe I'm misunderstanding the license terms but I feel like this is a bit of a "Maserati Problem", at least, if you are not competing directly with Facebook. If you are worried you might want to sue Facebook for patent infringement some day, you could still use React today and switch to Preact or some other library "just in time".

Just because you are not competing with Facebook today does not mean that Facebook will not be competing with you tomorrow.

[deleted]

Re: Yoga: A cross-platform layout engine

#106
post #79
post #77

Earlier quoted context omitted.

Please do not spread FUD, or at least clearly explain your worries. The patent clause only applies if you sue Facebook for patent infringement in React itself . It's a very clear defensive policy. Despite all the breathless blog posts claiming that you can lose your license for "competing" with Facebook, it is not true. https://code.facebook.com/pages/850928938376556

I never said that you could lose your license for competing against Facebook, I said that you could lose your license if you have a patent and assert it against Facebook if it infringes. This is the patent grant from React, which is identical to the grant in the post's repo as well. The language in the patent grant is pretty clear and doesn't mention anything about React specifically: The license granted hereunder wi…

If you name React in your patent lawsuit against Facebook, your license for React is terminated. Other software licenses remained unaffected.

That seems like a pretty reasonable stance for distributing an open source project.

Re: Yoga: A cross-platform layout engine

#107
post #87
post #62

One thing I've thought about recently is Facebook's Patent grants, and it's one thing that makes me uneasy about using any open source technology from Facebook like React (I currently do but am thinking to move to Preact because of the nicer MIT license and that it's analogous to React in many ways) because they're generally given a patent grant. I'm not a lawyer so I don't know if the grant would hold up in court si…

This is one of the reasons companies seek patents, called a defensive patent strategy. The goal is to discourage competitors from suing you for patent violations by making sure you own a patent your competitors are likely to have violated. It creates a kind of "mutually assured destruction" that discourages either party from launching a patent war (this only works against real competitors, not against patent trolls,…

[deleted]

Re: Yoga: A cross-platform layout engine

#108
post #89
post #62

One thing I've thought about recently is Facebook's Patent grants, and it's one thing that makes me uneasy about using any open source technology from Facebook like React (I currently do but am thinking to move to Preact because of the nicer MIT license and that it's analogous to React in many ways) because they're generally given a patent grant. I'm not a lawyer so I don't know if the grant would hold up in court si…

I am curious to hear of anyone who has reviewed this license with their lawyers / legal departments and received a positive, non-cautionary response to go ahead and use the software and libraries covered under it.

[deleted]

Re: Yoga: A cross-platform layout engine

#109
post #62

One thing I've thought about recently is Facebook's Patent grants, and it's one thing that makes me uneasy about using any open source technology from Facebook like React (I currently do but am thinking to move to Preact because of the nicer MIT license and that it's analogous to React in many ways) because they're generally given a patent grant. I'm not a lawyer so I don't know if the grant would hold up in court si…

Yes, given two libraries A and B, which are equal in all respects except one is encumbered with vague licensing talk, pick the one without! It's a good engineering practice, and it will ensure that we, as a community, evolve towards zero-licensing libraries.

Except two libraries A and B are never equal in all respects.

A library might have a stronger community or better documentation than the other. They might be equivalent today but evolve differently in the future. Etc.

The choice between two libraries is never that easy.

Re: Yoga: A cross-platform layout engine

#110
post #90
post #87

Earlier quoted context omitted.

This is one of the reasons companies seek patents, called a defensive patent strategy. The goal is to discourage competitors from suing you for patent violations by making sure you own a patent your competitors are likely to have violated. It creates a kind of "mutually assured destruction" that discourages either party from launching a patent war (this only works against real competitors, not against patent trolls,…

Let's say I have a patent for a technology outside of React, and even outside of software, such as some hardware patent. Why should me suing for infringement of that patent preclude me from using React when it (the patent infringement and React) are completely independent?

Because facebook wants to avoid getting sued. React is their bat and ball so they set the rules. If you don't like the rules go and play elsewhere - it is not like there aren't hundreds of other frameworks you can use.
Post reply on HN