realm.isClosed is undefined

Link to gist

I modified the example app in the Realm doc to use newer API’s like Hooks. The app crashes in the second useEffect() used to replace the deprecated componentWillUnmount() method. The error states that realm.isClosed is undefined.

Any idea what is causing the error?

I discovered that the error was not Realm related. I was using Hooks incorrectly. The gist will show the updated code.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.