microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.37k stars 1.14k forks source link

Change our new arch cpp-lib template to align with the RN "golden" template #13250

Open jonthysell opened 6 months ago

jonthysell commented 6 months ago

Summary

There's a (still in progress at the time of opening this) RFC to create a specific official "golden" template for RN libraries, being discussed here: https://github.com/react-native-community/discussions-and-proposals/pull/721

Specifics may change, but so far it looks like:

You can see the details here: https://github.com/react-native-community/discussions-and-proposals/pull/721/files#diff-3e529b09f72e10925002030c7234cea4ff1fcfff33aea495328c58e8b4518955

Motivation

When the output of this RFC becomes the official template, we'll want to pivot onto it for our template, because we can't possibly support every variation of libraries that have evolved in the community, we'll build on the standard and let others standardize their code or adapt ours.

Basic Example

No response

Open Questions

No response

jonthysell commented 2 months ago

It looks like the create-react-native-library command now has a --with-recommended-options to pick the recommended template to build.

jonthysell commented 2 months ago

@marlenecota As you're working on the new "joint" lib template for all-in-one old+new arch support, you should make sure it's based on top of the correct starting RN lib template with the recommended options in the previous comment (which IIRC is in fact new + old arch support)