Adding a Custom Fabric Component to RNTester (#32640)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32640

This Diff shows how an application can provide a custom Fabric Components Registry.
The idea is to extend the CoreComponentsRegistry from rncore to provide the extra
components that are generated from RNTester.

Please note that this Diff can't be shipped as it is and should be rebased on top of:
- D32493605 (https://github.com/facebook/react-native/commit/aa4da248c12e3ba41ecc9f1c547b21c208d9a15f) As the CLANGFORMAT is disabled for RNTester at the moment
- D32045059 (https://github.com/facebook/react-native/commit/d29f3d2a6b84c17ad057f4e9c8dc35b3fe16fb19) and D32128979 as they're effectively adding the sample component and the iOS code.

Changelog:
[Internal][Added] - Adding a Custom Fabric Component to RNTester

Reviewed By: ShikaSD

Differential Revision: D32498360

fbshipit-source-id: 1a737359498dddb571c8a445bec18e5dbcf53e04
This commit is contained in:
Nicola Corti
2021-11-22 08:13:00 -08:00
committed by Facebook GitHub Bot
parent 19bca222dc
commit 2162bce44b
16 changed files with 342 additions and 12 deletions
@@ -25,12 +25,12 @@ class CoreComponentsRegistry
CoreComponentsRegistry(ComponentFactory *delegate);
private:
friend HybridBase;
static std::shared_ptr<ComponentDescriptorProviderRegistry const>
sharedProviderRegistry();
private:
friend HybridBase;
const ComponentFactory *delegate_;
static jni::local_ref<jhybriddata> initHybrid(