Fork me on GitHub
#cljsrn
<
2021-01-19
>
zendevil.eth03:01:15

I’m using the CameraRollPicker from react-native-camera roll picker

zendevil.eth03:01:33

(:require [“react-native-camera-roll-picker” :default CameraRollPicker])

zendevil.eth03:01:43

(defn camera-roll-picker [] [:> CameraRollPicker {:callback (fn [] (prn “picked”))}])

zendevil.eth03:01:52

(defn init [] (dispatch [:register-db]) (render-root “Humboi” (r/as-element [camera-roll-picker])))

zendevil.eth03:01:04

but the app is crashing upon launch and there’s no error given

zendevil.eth03:01:15

how to fix this?

zendevil.eth03:01:49

this happens in the ios simulator

zendevil.eth03:01:17

on the device, it asked for permission to access photos, and then shows a blank screen

Michaël Salihi07:01:18

@ps Lots of questions and few thanks...

🙏 3
3
zendevil.eth07:01:02

thanks a ton! @admin055

😉 3
zendevil.eth07:01:10

for all the questions already answered

zendevil.eth07:01:43

thanks a lot everyone. I really appreciate the help

zendevil.eth08:01:00

actually I’m also getting the following warning:

zendevil.eth08:01:01

Tue Jan 19 2021 13:42:58.383]  WARN   Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. * If you’re updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run npx react-codemod rename-unsafe-lifecycles in your project source folder. Please update the following components: %s CameraRollPicker

joshmiller18:01:59

That appears to be in CameraRollPicker. React moves fast and breaks things, so you should be ready to upgrade that dependency when it’s upgraded.