Question · React Native course · Module 11: Device and sensors

subscription.remove

How do you clean up a sensor subscription in useEffect?

Answer options

  • subscription.stop()
  • subscription.remove()
  • subscription.cancel()
  • subscription.unsubscribe()

You can check the correct answer by solving this task in the CodeWorlds game.