3 ms·
No, only if you plan on writing any reusable components. Which is sort of the point of any framework. Well, unless you plan on writing all your code in one fil
by spion 10y ago
No, only if you plan on writing any reusable components. Which is sort of the point of any framework.
Well, unless you plan on writing all your code in one file (likely painful), or using an async loader (either slow, or painful because of manually managing dependencies and load order).
- flukus 10y agoWe had reusable components long before SPAs, but each individual page is largely unique anyway.
- spion 10y agoDepends on what you see by "largely unique". Do you have a spinner while you wait for data to show up on each page? Then you might have a common spinner component. Of course, you could also re-code the spinner every single time. Or you could use an existing library of components and then you don't have to deal with modules, only that library does.
- flukus 10y agoEasily done by including the component server side, either in the master page (for common things that are used everywhere) or the page itself. SPA's do literally nothing to componentize sites/apps that we couldn't do before.
- spion 10y agoHow about components that you need twice on the page? Are you going to just include them and their JS twice? Or perhaps build an elaborate server-side module system, one in which components required multiple times are only included once at the end of the page with a script.