6 ms·
Perhaps I wasn't clear about it. I don't want to use react or angular, just jquery and other small libraries or components
by bizon 9y ago
Perhaps I wasn't clear about it. I don't want to use react or angular, just jquery and other small libraries or components
- lioeters 9y agoOh I see, should have noticed when you said pjax. I imagine some concepts will be applicable in any case, like: - URL routing on both client/server: for navigation without page reload, as well as rendering the same content when the user lands on a particular page for the first time (or refreshes the page) - Templates on both client/server: maybe you could share the same HTML (or Mustache, Pug, etc.) templates on both sides - Passing initial state from server -> client: typically, a JS snippet can be injected in a page template to pass an object, so the client-side can sync the state (initial route, etc.) - Dynamic loading of additional scripts: some routes may request additional scripts via AJAX/fetch, in which case a small library/wrapper may be useful, to know when it finished loading to do something