Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
L20n mixin for react.js (UNTESTED!)
###*
@jsx React.DOM
###
L20nMixin =
propTypes:
context: React.PropTypes.any.isRequired
getInitialState: ->
if @props.getLocalizedEntities?
ids = @props.getLocalizedEntities()
@props.context.localize ids, (l10n) =>
@setState {l10n}
return
return
l10n: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.