LoginSignup
6
6

More than 5 years have passed since last update.

Arda@0.13&BabelでHello, World

Last updated at Posted at 2015-03-15

バージョンを上げたら動かなかったので備忘録。

window.React = require('react');
window.Promise = require('bluebird');
import {Context, DefaultLayout, Router, mixin} from 'arda';

var App = React.createClass({
    mixins: [mixin],
    render: ()=> {
        return <h1>Hello, World.</h1>;
    }
});

class AppContext extends Context {
    get component() { return App; }
}

window.addEventListener('DOMContentLoaded', ()=> {
    let router = new Router(DefaultLayout, document.body);
    router.pushContext(AppContext, {});
});

大きいところでは、Arda.Componentが無くなったこと。React側がES6のclassではmixinをサポートしない件の絡みだと思われ。あとは、static get component()と、staticでなくなったとか、Arda.*と書けなくなったとか?(ES6の文法は詳しくないので書き方の問題かもしれない)

今までの記事のコードは直すとしても時間が掛かるので、取り急ぎ。

6
6
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6