Closed arpitv96171 closed 2 months ago
You need to share way more code. The original error doesn’t seem to be related to zeego
@nandorojo
To be specific, the problem appears to be in the packages/zeego/src/menu/create-ios-menu/index.ios.tsx
and packages/zeego/src/menu/create-android-menu/index.android.tsx
const ItemTitle = create(({ children }: MenuItemTitleProps) => { if (typeof children != 'string') { throw new Error('[zeego] <ItemTitle /> child must be a string') } return <>{children}</> }, 'ItemTitle')
When a string child is passed, it results in an error due to children not being wrapped in <Text>
component for android and iOS.
When non-string child is passed, zeego errors with error as mentioned in the code.
Please share your full code you used for me to help. You should be passing a string directly to ItemTitle. If you want to pass a text node, then you need to create a custom component using the Custom Components guide in the docs
Surprisingly it's working alright now. I'll close this issue. I will raise one if any issue comes up in the future
When using just the string, the following error is thrown: Code being used:
<ContextMenu.ItemTitle> Redo </ContextMenu.ItemTitle>
Error received:
When using text with the
Text
tag, the following error is thrown: Code being used: `