Hi there
I am deeply impressed how extensive and sophisticated this framework is. Respect to the authors!
I rarely used JS the last years and just started to dig more into it. While I made some progression the most difficult part is, I donât know where to put functions/methods/variables inside the code. At the end of app.js, inside the script part of the components, right inside the routes, âŚ
For example I struggled on creating an Action Sheet. The docs say $$('.ac-1').on('click', function () {ac1.open(); });
but what works inside app.js is $$(document).on('click', '.ac-3', function () {ac3.open(); });
I would love to get some advice from you guys. What/where should I learn to have better understanding what is going on and how Framework7 works? Would I benefit learning Vue.js? Some parts look like it, even while I am not in using f7-vue.
That is the good part of Framework7. You can put it in any of listed places, but of course some little understanding is required for how the each of these place works.
That is about general understanding how JavaScript and DOM work.
I can recommend you the following to learn JavaScript basics:
https://wesbos.com - tutorials from Wes Bos. I havenât checked them but i know they are very well accepted by community
I think the key is
youâd better think you will coding for something(component) with templateădataămethodsăon(hooks)
the only way to control it is writing a {keyďźvalue} object as parameter,of course you can write it as function returned.
try your best forget â$(document)â,i think it is worst coding way personally.
you can also think sigle-file-component as a component
Thanks for the links nolimits4web! I will check them. Have bought a JS course on Udemy too (donât know about the quality, never used it before). Never had much interest for JS, but I really want to do more with Framework7. hongfu, Iâll try my best