Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// The following is a thought experiment of how it COULD work
// todos-template.js
export default (todos) => {
return `
<div class="todo-wrapper">
<p>Remaining: ${ todos.length }</p>
<ul class="todos">
${ => `<li class="${ todo.completed }">${ todo.text }</li>`) }
// main.js
import TodosTemplate from "todos-template";
import ReactView from 'react';
class TodosView extends ReactView {
constructor() {
this[todos] = [];
render() {
return TodosTemplate(this[todos]);
var todosView = new TodosView();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.