Preact: Preact render undefined element

Created on 2 Mar 2017  路  1Comment  路  Source: preactjs/preact

import {h, Component} from 'preact';

export default class PropList extends Component {
    render() {
        const aaa = ['a', 'b', 'c'];
        const list = aaa.map((item, index) => {
            return <div>foo bar</div>
        });
        console.log(list);
        return {list};
    }
}

my project is based on https://github.com/developit/preact-boilerplate and I put this into app.js Router part.

<PropList path="/test"/>

and I get this:
image
that "undefined" is my PropList.

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nopantsmonkey picture nopantsmonkey  路  3Comments

simonjoom picture simonjoom  路  3Comments

paulkatich picture paulkatich  路  3Comments

jescalan picture jescalan  路  3Comments

marcosguti picture marcosguti  路  3Comments