0

I'm trying to build a fabric native react component, and I'm following the steps as outlined here: https://reactnative.dev/docs/next/the-new-architecture/pillars-fabric-components

When I use codegen to generate the props from my MyCustomCompNativeComponent.tsx, I use the following props:

export interface NativeProps extends ViewProps {
  text: string;
  title: string;
  actions: ReadonlyArray<Readonly<{id: string; actionName: string}>>;
}

Everything goes as expected - except on the last step, when I actually build the project on Xcode, i get an error in React-Codegen: No matching function for call to 'fromRawValue'

I think this happens when codegen is trying to generate the props for the native side, and the array of objects in the actions prop is not getting converted as expected - which leads me to believe if that's the right way to mention a prop that is an array of objects

I know this is the case because if I comment out / remove that prop, everything works as expected

So it basically boils down to - Am I misunderstanding how to specify a prop of type "array of objects" to codegen?

EDIT: made a sample repo here: https://github.com/kalyantm/test-app

0 Answers0