How to use Native Plugins in @ionic/react?

It seems that all native plugins are stick to Angular, no sample for React.
image
image
image
image

The question is when will @ionic/react be supported in Native Plugins?

Hi
Those imports are syntactic angular sugar for the underlying cordova implementation

Are u wondering if ionic is going release react sugar or whether any of the underlying ever be available in react?

The first I cant tell, second: u can use any cordova plugin in react using the vanilla js interface

@Tommertom
Thank you for your suggestion. Can you give me an example of using Cordova Plugin in Ionic-React using vanilla JS?

Thanks.

Hi
I don’t use React, so can’t. Sorry.
But I assume you know how to include vanilla JS in a react project.

Example:
https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-vibration/

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log(navigator.vibrate);
    navigator.vibrate(1000);
}

Tom

Thank you :slight_smile: