Skip to content

No matching function for call to 'fromRawValue' #35054

Closed
@kalyantm

Description

@kalyantm

Description

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' (check attached screenshot)

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?

Version

0.70.2

Output of npx react-native info

    OS: macOS 12.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 228.14 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 1.22.18 - /opt/local/bin/yarn
    npm: 7.0.15 - ~/.nvm/versions/node/v15.4.0/bin/npm
    Watchman: 2022.10.03.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      Android NDK: 24.0.8215888
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8309675
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.16.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0
    react-native: 0.70.2 => 0.70.2
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

Snack, code example, screenshot, or link to a repository

https://github.com/kalyantm/test-app

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍StaleThere has been a lack of activity on this issue and it may be closed soon.Tech: CodegenRelated to react-native-codegenType: New ArchitectureIssues and PRs related to new architecture (Fabric/Turbo Modules)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions