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
When producing UserControl projections, the ReactNativeXaml project carries metadata for both XAML and the custom WinMDs. This means we end up with modified files inside node_modules. Ideally the codegen files for the custom winmds would be separate from the XAML ones.
The work here is:
Produce separate creator/properties/event tables for different assemblies. The ones for XAML go in the ReactNativeXaml project, whereas the projections for the custom WinMDs should go in the App project
The ReactNativeXaml project should have build logic to discover the custom WinMD projections so it links all of them together
Ideally do this in an automatic way: app project references a winmd, and there is a script that will re-run codegen
The text was updated successfully, but these errors were encountered:
Produce separate files for XAML and the custom WinMDs. The custom WinMD codegen would need to be part of the app
This poses a problem since the custom codegen still needs to get linked into ReactNativeXaml, so we end up reaching into the app's project via msbuild props
But also, RNX needs to have a winmd reference to the custom winmd so that cppwinrt can process it, so this would effectively still require modifying RNX under node_modules. An alternative would be to reuse the app's cppwinrt generated headers but this is very fragile (e.g. different versions of cppwinrt between the app and RNX would cause build breaks).
moreover this complicates the codegen'd TS since type needs to be a set of known strings (known at codegen time). An alternative is to have a synthetic property on UserControl like userControlType that is just a string (as opposed to type which is a string union); we lose intellisense/type safety with this so not ideal either.
Codegen the whole view manager, not just the metadata. Then the app project just gets everything in one package
Apps that only need XAML can use the view manager from the package, apps that need custom stuff will use the generated one
It would make sense to split codegen into its own npm package, and have the XAML VM be wholly generated by it
This could make it trickier to iterate on the VM (since the experience isn't great for T4 files, no intellisense, etc., it's just text)
This is closer to what is possible today; you can run codegen and it will update the code in node_modules, and then you can copy the resulting RNX project into your project and get rid of the RNX npm package dependency
When producing UserControl projections, the ReactNativeXaml project carries metadata for both XAML and the custom WinMDs. This means we end up with modified files inside node_modules. Ideally the codegen files for the custom winmds would be separate from the XAML ones.
The work here is:
The text was updated successfully, but these errors were encountered: