Best Approach to populate inputs on the page


Hey guys,
In your opinion, what is the best approach to pass data to a input field?

Usually I do things like:
<input type="text" value="{{ data ? data : '' }}">

But sometimes I prefer (or need because of a plugin) to use jquery, for select fields for example is more easy add this in the end of my template.


But I am not sure if this is correctly, since my page will have a bunch of script tags when rendered and I don’t know if this is a good practice or cause issues with performance.