react-native-windows
react-native-windows copied to clipboard
Evaluate updating View and Text to leverage IViewManagerCreateWithProperties
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
Could have performance impact as well, as for example with PasswordBox it creates both that and a TextBox. So code cleanup... but more.
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!