Capacitor v3 deprecated handlers (back button) with Ionic #4576
-
I'm currently testing the Capacitor v3 (3.0.0-rc.3) release candidate because it seems really promising, and the new plugin API is way better. This event was used by Ionic to provide an intuitive navigation but this no longer works. How can I achieve this using capacitor v3, should I implement this behavior in a custom plugin ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use the const handle: PluginListenerHandle = App.addListener('backButton', listenerFunc); The reason this was changed was because for v3 was that we pulled out all of the plugins so they would be imported dynamically rather than bundling the plugins in with the Capacitor core runtime |
Beta Was this translation helpful? Give feedback.
You can use the
@capacitor/app
plugin and implement aBackButtonListener
using this code (docs here)The reason this was changed was because for v3 was that we pulled out all of the plugins so they would be imported dynamically rather than bundling the plugins in with the Capacitor core runtime