How to access plugin settings from PHP into JS Gutenberg?

Hello guys, I’m create an add on for GravityForms but it’s in PHP, all is working great, and I’m saving some settings indo wp_options from it, like an Api Secret Key.

In the same plugin I’m creating a widget but using Gutenberg with JS.
I’m new into this JS layer in WordPress so I’m confusing in how to get those options from DB.

I found something about @wordpress/hooks but I don’t find examples to it.

Anyone can gives me a idea? 💡

Thanks for all.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer