Autolinking doesn't work for Components that use c++ state #71
-
I've tried autolinking in React Native 0.70.0 but it doesn't work for components that use c++ state. These components have Please can you tell me how I can get my hand-written ComponentDescriptors included in the generated |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 20 replies
-
This sounds like a perfectly valid use case. Right now the |
Beta Was this translation helpful? Give feedback.
-
I've just tested Autolinking from 0.70 with a custom component that uses C++ provided state and I can confirm that it works. If your component has
module.exports = {
dependency: {
platforms: {
android: {
componentDescriptors: ['UnicornViewComponentDescriptor'],
androidMkPath: "../cpp/Android.mk"
},
},
},
}; I've worked with @troZee to showcase how this can be done here: I've also pushed a change in the CLI that allows to specify a We're looking into extending the codegen to offer state support, so we hope you won't need custom C++ sources at all. |
Beta Was this translation helpful? Give feedback.
-
Hi @grahammendick, |
Beta Was this translation helpful? Give feedback.
Hi @grahammendick,
starting from example provided by @cortinico I believe I managed to create working setup for
react-native-screens
that does not require copying all codegened code (and later maintaining it). You can see it here. I did not have to tackle with TurboModules though.