react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

Evaluate updating View and Text to leverage IViewManagerCreateWithProperties

Open asklar opened this issue 3 years ago • 2 comments

View looks like it sometimes has an additional element to handle some border properties, and sometimes is a control (I suspect if it needs to be focusable).

Basically we should make sure that we dont end up going through TryUpdateView and changing the control on the initial render. -- Not sure the details of what change would be needed for that to happen.

TextInput has something similar where it changes from TextBox to a PasswordBox depending on its properties.

Originally posted by @acoates-ms in https://github.com/microsoft/react-native-windows/pull/7137#issuecomment-780189361

asklar avatar Feb 16 '21 23:02 asklar

Could have performance impact as well, as for example with PasswordBox it creates both that and a TextBox. So code cleanup... but more.

chrisglein avatar Feb 18 '21 19:02 chrisglein

Doing some lightweight perf testing, I see we spend a non-trivial amount of time transferring properties. Generally focusable Views or secureTextEntry TextInputs are initialized with these props and they remain stable, so it definitely makes sense to do this!

rozele avatar Aug 01 '22 15:08 rozele