Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

WIP riotjs version of the marathon app #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import {render} from 'react-dom';
import domReady from 'domready';
import riot from 'riot';
import MarathonStore from 'MarathonStore';
import 'tags.js';

import App from './app.js';
var marathonStore = new MarathonStore()

domReady(() => {
const container = document.getElementById('app');
render(<App/>, container);
});
riot.mount('marathon-app', {store: marathonStore})
17 changes: 17 additions & 0 deletions src/tags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import riot from 'riot';

riot.tag(
'form',
'<form>{opts.children}</form>',
function (opts) {
var dispatcher = this.opts.store.dispatcher;
// TODO Can we pass a function to the component children?
}
)

riot.tag(
'TextInput',
'<input type="text" value="{value}" placeholder="{placeholder}" onChange="{onChange}" />',
function (opts) {
}
)