How to get data from a datasource with JavaScript?

Hey guys, I’m new to grafana and I’m developing a plugin panel

Reading the documentation, I noticed that via React, the ‘data’ props brings the information that comes from the datasources. And that helps a lot in productivity during development.

const { data } = props;

But and via pure JavaScript, how does Grafana recognize information via datasource? Is there a variable equivalent to ‘data’?

Sorry if it was a layman’s question, but if you can guide me in any way in this question, I’m very grateful!

What are you looking to use the data for? Do you want to access the response from the most recent query, or are you looking to make non-query requests, e.g. for auto-completion?