Currently, we are using Monaca CLI to develop OnsenUI+React+redux.
So I have a question, how do I use the Cordova plug-in on React?
First of all, I wanted to display the terminal information, so I got cordova-plugin-device from npm, and
http://docs.monaca.io/ja/reference/cordova_6.2/device/
on the React code with reference to
console.log(device.version)
I tried to do things like that, but as I expected, I get scolded for undefined things.
Self-resolved.
First of all, it doesn't work well without the actual device (Android, iOS).
Browser validation such as monaca service did not fire the device ready event.
You must use Ripple, etc.
I could use it without any problems with the actual device such as monaca debug.
© 2025 OneMinuteCode. All rights reserved.