mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
a09ab53692
Summary: This diff changes the signature of ComponentDescriptor constructor to make it simpler and easier to support: now all arguments are passed via struct that contains all these arguments as fields. Now the ComponentDescriptor constructor accepts three arguments one of which is optional. This causes some confusion and the possibility of bugs in all subclasses that needs to implement a custom constructor. Mostly because in every case we need to ensure that the constructor: * Accepts and pass down all parameters/arguments; * Accepts the right types of those parameters (shared vs weak pointers, references vs values). * Accepts all thee arguments and pass them (including flavor!). We failed this point several times. Overal that makes the code simpler and allows changing the set of parameters relatively easy. (There is no plan for it!) Look at the LOC balance: less code! Changelog: [INTERNAL] Reviewed By: sammy-SC Differential Revision: D18548173 fbshipit-source-id: 5d038b135e004f6c054026b3235ed57db99c086d