-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
Add new primitive PropType Symbol
#6377
Commits on Mar 30, 2016
-
Added Symbol primative PropType.
With the edition of ECMA-262, we now have a new primative type called Symbol. This primative type should be added to the PropTypes, as users will eventually be using Symbols in their props for describing unique and immutable data, such as identifiers.
Configuration menu - View commit details
-
Copy full SHA for 97bcce5 - Browse repository at this point
Copy the full SHA 97bcce5View commit details -
Added tests for the new primative, Symbol.
I believe that I covered all the typical use cases for Symbols. If you think that I missed one, feel free to contribute.
Configuration menu - View commit details
-
Copy full SHA for 75c4e03 - Browse repository at this point
Copy the full SHA 75c4e03View commit details
Commits on Mar 31, 2016
-
Most ES6 polyfills will add support by implementing `Symbol` as a function. This causes `typeof` to return `function` rather than `symbol` for polyfilled clients.
Configuration menu - View commit details
-
Copy full SHA for 5485ac8 - Browse repository at this point
Copy the full SHA 5485ac8View commit details
Commits on Apr 2, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 13d9720 - Browse repository at this point
Copy the full SHA 13d9720View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d8ab0e - Browse repository at this point
Copy the full SHA 0d8ab0eView commit details -
prop-types(symbols): rewrite isSymbol to be simpler
1) If it is a native Symbol 2) If it is spec-compliant 3) Try to match non-spec compliant polyfill by a instanceof check on Symbol if it exists in the global namespace
Configuration menu - View commit details
-
Copy full SHA for 4239f8a - Browse repository at this point
Copy the full SHA 4239f8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c291f8a - Browse repository at this point
Copy the full SHA c291f8aView commit details
Commits on Apr 5, 2016
-
Merge pull request #1 from RaitoBezarius/fork/proptypes-symbol
Improve symbol check for (local) polyfills
Configuration menu - View commit details
-
Copy full SHA for f846b54 - Browse repository at this point
Copy the full SHA f846b54View commit details -
prop-types(tests,code-style): fix missing semicolon, unexpected space…
…s and trailing comma
Configuration menu - View commit details
-
Copy full SHA for a98e2cb - Browse repository at this point
Copy the full SHA a98e2cbView commit details -
Merge pull request #2 from RaitoBezarius/fork/proptypes-symbol
Fix code-style issue with React guidelines
Configuration menu - View commit details
-
Copy full SHA for ced7a3d - Browse repository at this point
Copy the full SHA ced7a3dView commit details
Commits on Apr 7, 2016
-
More specific typeof check for polyfilled Symbol
Let's get more specific with our tests. Symbol has to be a function if it's a polyfill. There are no object polyfills out there. (If there is, ping me and I'll add support) Instead of checking if Symbol is undefined, let's check if it's a function instead since instanceof is depending that Symbol is already a function.
Configuration menu - View commit details
-
Copy full SHA for 05820f8 - Browse repository at this point
Copy the full SHA 05820f8View commit details
Commits on Apr 8, 2016
-
Removed test support for medikoo/es6-symbol
There seems to be a bug with medikoo/es6-symbol where the global state affects the implementation of the polyfill. I found this by running the individual test file alone then running all the tests using `grunt test`. I found that it passes when ran alone and failed when ran collectively. I did not find this buggy behavior with zloirock/core-js's implementation of a polyfill for Symbol. Thus, removing I will keep the more popular polyfill (core-js) and remove the buggy polyfill (es6-symbol). If you are reading this and can think of a confounding factor that is causing this bug, please let me know and we can try to work together to add support for medikoo/es6-symbol.
Configuration menu - View commit details
-
Copy full SHA for ad94295 - Browse repository at this point
Copy the full SHA ad94295View commit details
Commits on Apr 11, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 95fed01 - Browse repository at this point
Copy the full SHA 95fed01View commit details -
Merge pull request #3 from RaitoBezarius/fork/proptypes-symbol
Remove unused ES6 Symbol dependency
Configuration menu - View commit details
-
Copy full SHA for 6e4f3ea - Browse repository at this point
Copy the full SHA 6e4f3eaView commit details