Open elliotwaite opened 1 year ago
Confirming the issue, got the same
any updates on this?
I solved it patching react-native typings
diff --git a/node_modules/react-native/Libraries/Text/Text.d.ts b/node_modules/react-native/Libraries/Text/Text.d.ts
index a9d2a1b..8274e84 100644
--- a/node_modules/react-native/Libraries/Text/Text.d.ts
+++ b/node_modules/react-native/Libraries/Text/Text.d.ts
@@ -19,6 +19,7 @@ import {
NativeSyntheticEvent,
TextLayoutEventData,
} from '../Types/CoreEventTypes';
+import { Signal } from '@preact/signals-react';
export interface TextPropsIOS {
/**
@@ -107,7 +108,7 @@ export interface TextProps
*/
allowFontScaling?: boolean | undefined;
- children?: React.ReactNode;
+ children?: React.ReactNode | Signal<React.ReactNode>;
/**
* This can be one of the following values:
running into similar issue with react in the web.
When I try to use a signal as a child of a React Native
<Text>
component, it works, but I get the following TypeScript errors. Is there a way to make TypeScript allow the use of signals inside<Text>
components?This is the error when
<Text>
contains only a signal:This is the error when
<Text>
contains both text and a signal: