javascript - Pass default parameter values in function react -
i got error after updating react-native , react
i think right syntax, don't know why error shown:
this.list = function(table, callback, wheredata = [],selection = '',extra = '') {
syntaxerror: unexpected token =
@ exports.runinthiscontext (vm.js:53:16)
@ module._compile (module.js:387:25)
@ object.module._extensions..js (module.js:422:10)
@ module.load (module.js:357:32)
@ function.module._load (module.js:314:12)
@ module.require (module.js:367:17)
@ require (internal/module.js:16:19)
@ object. (/users/apcrat/documents/redux/delfoo_react/api/model/catalog/cuisine_route.js:7:12)
@ module._compile (module.js:413:34)
@ object.module._extensions..js (module.js:422:10)
you need compile code babel.js use ecmascript 6 features or if want work on es5, can this
Comments
Post a Comment