bloggy icon indicating copy to clipboard operation
bloggy copied to clipboard

Why a component/JSX file to list up posts?

Open marvindanig opened this issue 9 years ago • 0 comments

I see there is a component inside assets/javascripts directory with following contents:

This thing breaks the $ rake assets:precompile RAILS_ENV=production task due to the < character inside JSX file:

/** @jsx React.DOM **/

var PostsList = React.createClass({
    getInitialState: function() {
        return { posts: this.props.initialPosts };
    },

    render: function() {
        var posts = this.state.posts.map(function(post) {
            return <Post key={post.id} post={post} />;
        });

        return (
            <div className="posts">
                {posts}
            </div>
        );
    }
});

marvindanig avatar Feb 11 '16 04:02 marvindanig