Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Migration from version 0.5/0.6 to latest : Error level symbol def must be a function returning a component list #541

Answered by slmjkdbtl
loicdescotte asked this question in Q&A
Discussion options

You must be logged in to vote

Instead of

'x': [
    sprite(),
    pos(),
    // other components..
]

you should pass a function that returns the list of components

'x': () => [
    sprite(),
    pos(),
    // other components..
]

which is a shorthand for

'x': () => {
    return [
        sprite(),
        pos(),
        // other components..
    ]
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@loicdescotte
Comment options

Answer selected by loicdescotte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants