Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept Immutable Iterables in 'render' #2667

Closed
davidmccabe opened this issue Dec 5, 2014 · 1 comment
Closed

Accept Immutable Iterables in 'render' #2667

davidmccabe opened this issue Dec 5, 2014 · 1 comment

Comments

@davidmccabe
Copy link
Contributor

It would be nice if Immutable Iterable types were accepted in place of arrays, so that one could say:

render: function () {
    return <ul>
        {this.props.anImmutableThing.map((x) => <li>{x}</li>)}
    </ul>
}

rather than:

render: function () {
    return <ul>
        {this.props.anImmutableThing.map((x) => <li>{x}</li>).toArray()}
    </ul>
}

the later being ugly and easy to forget.

@sophiebits
Copy link
Collaborator

I believe this should already work in master after #2376 (not in a release yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants