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

allow data types to be represented as ES6 symbols #102

Merged
merged 1 commit into from
Feb 27, 2015
Merged

allow data types to be represented as ES6 symbols #102

merged 1 commit into from
Feb 27, 2015

Conversation

mistadikay
Copy link
Contributor

With new “symbol” primitive type in ES6 there is a good pattern using symbols as constants values to guarantee these values to be unique. More about symbols here: http://www.2ality.com/2014/12/es6-symbols.html

Usage example:

module.exports = {
  BLOCK: Symbol(),
  IMAGE: Symbol()
};

gaearon added a commit that referenced this pull request Feb 27, 2015
allow data types to be represented as ES6 symbols
@gaearon gaearon merged commit de6eeb6 into react-dnd:master Feb 27, 2015
@gaearon
Copy link
Member

gaearon commented Feb 27, 2015

That's nice. Thanks!

@gaearon
Copy link
Member

gaearon commented Feb 27, 2015

Released in 0.9.1.

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

Successfully merging this pull request may close these issues.

None yet

2 participants