3 ms·
There are definitely drawbacks, but I'll tell you the best two reasons I know why you should render partials in JS: - It means you can render partials to the u
by arnorhs 16y ago
There are definitely drawbacks, but I'll tell you the best two reasons I know why you should render partials in JS:
- It means you can render partials to the user before you receive data from the server. So things seem to happen instantaneously to the user.
- It also means you can have your partials rendering in a single place and rendered by a single template engine.
- catshirt 16y agosurely. the first reason is clear to me. i use client side transformations for this purpose. performance was admittedly awfully misdirected in a general context. i suppose my situation is unique; several templates on my app require complex logic or additional requests based on properties of the initial request. this is where you start to see it get hairy. again though, admittedly not the normal scenario. i appreciate you taking my question literally, as it was meant.
- arnorhs 16y agoIt's a good point. When you have complicated templates, usually these JS template libraries fall a bit short.