re-base
re-base copied to clipboard
Use of Map and WeakMap
Is the use of Map and WeakMap necessary? I recently added error tracking to our site and found out that old clients barf on these requirements. The alternative is of course to polyfill, but that should probably be documented.
@oscar-b I don't think Map is necessary for keeping track of listeners and refs. Could use a different approach. The WeakMap is used because React does not have a unique identifier for each component and syncState
needs that. Which clients are having issues?
@qwales1 Older versions of Chrome (v34) used in Samsung phones from 2014 branded as Samsung Browser.
@oscar-b does the error reporting tell you what specifically its blowing up on? Is it Symbol
?
ReferenceError
Map is not defined
I guess it's: new WeakMap
? Or what do you mean?
@oscar-b Yes sorry that is what I was asking. Could add es6-map
and es6-weak-map
ponyfills as dependencies. They do not mess with the global scope.
I would either refactor to use regular object/array or add documentation about compatibility and use of something like polyfill.io.