Open ShineKidd opened 4 months ago
configure app.json
"plugins": [ "expo-router", [ "expo-build-properties", { "ios": { "newArchEnabled": true }, "android": { "newArchEnabled": true } } ] ],
import useSWRMutation from 'swr/mutation' function Home () { const {trigger, data, error} = useSWRMutation('https://github.com', (key) => fetch(key).then(res => res.text())) console.log({data, error}) // always print {"data": undefined, "error": undefined} function submit () { // print error: "(NOBRIDGE) ERROR [TypeError: Cannot read property 'add' of undefined]" trigger().then(console.log).catch(console.error) } return ( <View> <Button title='mutation' onPress={submit}></Button> </View> ) }
I've facing the same issue whenever using the mutation. Probably related to the usage of transition.
Bug report
Repro Steps / Code Example
configure app.json