I have SPA built using dojo with structure like:
App
- > Parent Component
- > Child component
- > Child component
For my Parent component I defined model and create instace of it in component's constructor.
Now in my parent component I create instances of children like this:
const tabs = [
new Head({model: model}),
new Main({model: model}),
new Statement({model: model})
];
So I access model in children components with this
keyword.
Wouldn't it be better to create instance of model for current component in some global namespace and access it in all child components like app.model
or just global variable model
just to avod of passing reference through cascade of nested components?
Which approach is better an why?
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
This is my first attempt to create a page with HTML and javascript
gents I am struggling with this problem on an older project I have for a whileI also created a sample repo : https://github
I am using Vuejs and Vuex to play around withCurrently i have an issue updating the view (vuejs) after an AJAX call has been fired