Exploring some Advanced topics in JS I am currently diving into and there is an interesting concept that's piqued my curiosity.
I've been developing a VueJS application and now I'm looking to expose certain data and even methods from Vue outside of the Vue framework itself, leveraging vuex along the way.
The goal here is to allow users to utilize standard JavaScript on the front end to enhance the functionality of the application.
The vision is for users to incorporate something like this in their front-end code. I have come across various JS frameworks/apps that adopt a similar approach.
MyApp.onReady.then(function(instance) {
// utilize the instance object
var email = instance.data["email"]
var name = instance.data["name"]
var isComplete = member.isComplete
})
Now, what I'm striving to comprehend is the implementation required in my App to bring the above scenario to life.
Based on the code provided, it seems there is a Class MyApp that is instantiated with new MyApp({}), featuring a promise being resolved, yet the actual steps to achieve this remain uncertain to me.