-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial signal value react native input field not showing #571
Comments
Looks like unwrapping the signal works, issue with the binding in RN I guess. |
Unwrapping it also has bugs. I can't input text on android/iPhone |
You checked the "I understand usage changed in v2, and I've followed the React Integration instructions" box yet I don't see any indication of using the Babel plugin or |
Oh my apologies, I assumed the stuff in readme was the latest. I will try again with useSignal and give you an update later. |
Is the Babel stuff optional if I just use useSignal? |
The ReadMe does document the latest usage, you just seem to have skipped over it.
|
Oh, by the way, the hyperlink for the issue template |
Yup, realized that. My bad #573 |
Looks like they don't support package exports? That's a bit rough, I suppose you can try forming the path manually? |
Annoyingly that didnt work either 😦 let me really quickly create a new react native project without expo 1 sec |
Well, its working, however its not finegrained. Other elements also update. Unless its not intended to be finegrain like solidjs? Am i missunderstanding? export default function App() {
useSignals();
return (
<SafeAreaView style={styles.container}>
<TextInput
style={styles.input}
value={testSignal.value}
onChangeText={e => (testSignal.value = e)}
/>
<Text>
<>{testSignal}</>
</Text>
<Text>{Math.random()}</Text>
</SafeAreaView>
);
} |
Yes, if you unwrap with However, if RN is borked then this is all that I can recommend at the moment. RN isn't something we directly support / test against. |
yea its broken when i dont unwrap 😭 |
Environment
@preact/signals-core
@preact/signals
@preact/signals-react
Describe the bug
On web, it works fine. the input field shows the existing signal value. but on ios/android, the initial signal value does not show.
To Reproduce
https://snack.expo.dev/PWLDLLtxZpvpWq2hW_OKT?platform=web
Steps to reproduce the behavior:
Expected behavior
The input field for ios/android should contain the word "test" just like in the web version.
The text was updated successfully, but these errors were encountered: