3 ms·
You can use `<template>` for that purpose and keep your separation of concerns okay.
by yohannparis 3y ago
You can use `<template>` for that purpose and keep your separation of concerns okay.
- gitaarik 3y agoIndeed, the Web Components APIs don't demand that you put the HTML and JS together. You can use it and structure it to your own likes.
- MrDresden 3y agoAs a non web dev I had to look this up and yeah, this looks like a very sane and clean way to separate concerns and get proper handling from IDEs: https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...