You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated in #879, getFirst can result in two instances. Then later when the results of getFirst are used, we simply grab the props off the created element and create a new element such as:
At most there are 2 elements of DatePicker.DateSelect created, and 1 element of DateSelect is created. These are distinct components as DatePicker.DateSelect has render: () => null since it's only used to pass props. Meanwhile the DateSelect element created in DatePicker's render function is the fully rendered DateSelect with render logic. The latter, expensive component is always rendered regardless of getFirst's code path, so performance gains from minimizing element creation of DatePicker.DateSelect would not be as great as you might expect.
Regardless, i like the idea of passing props to getFirst that minimizes element creation.
As stated in #879,
getFirst
can result in two instances. Then later when the results of getFirst are used, we simply grab the props off the created element and create a new element such as:which results in 3 instances. Should we update
getFirst
to accept additional props or return a constructor?The text was updated successfully, but these errors were encountered: