-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
syr-cliversion: latestsyrversion: latest
Problem Description:
After updating state variables in my syr.js class with this.setState({ var: newValue }); and running it in Xcode emulator, I get the following error in Xcode:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[UIView setText:]: unrecognized selector sent to instance 0x7fdd616193d0'
***
The issue occurs if importing syr components from the node module @syr/core, which was installed automatically by the syr-cli tool.
Suggested Solution:
I fixed this by adding my syr.js classes to my cloned, local, version of the Syr core repo. In my classes, I imported all syr components from 'index' (referring to index.js in the core repo) as opposed to from '@syr/core'. [This is also the way imports are done in the samples.] State updates then work properly when running on emulators.
Metadata
Metadata
Assignees
Labels
No labels