#Wrong import? Need help!
45 messages · Page 1 of 1 (latest)
what are the errors?
one sec
CameraType is a type, not a value
it's "front" | "back"
you'd use those strings literally
it's not an enum
ahhh
when you do useState(null), ts doesn't know if you want other types as well, it's just a state typed null
you have to specify what type it should have
useRef as well
useState("back") would have a similar problem, so for that, use useState<CameraType>("back")
well, what's the error
let me rerun for a sec
looks like a type error, so this won't show up in your app
just hover over the error
am i tripping 
see above about useState types
"expo-camera": "~16.0.10",
ah. hm. not the right version to check.
what version of expo are you using
also, use npm ls expo rather than what's shown in package.json, please
52.0.23
right then you should use these v52 docs
what docs were you referencing before?
you still haven't typed useRef
Nah is just realised my code was bad, so im rewriting it like in the docs
