React.__spread support
VinSpee opened this issue · 4 comments
Hi!
I'm using react-lite along side of react-typeahead.
It digs into React.__spread
, which is just an Object.assign polyfill. Is it possible / valuable enough to add that method to react-lite?
JSX spread just works well when use webpack, it seems like browserify do somethings differently in it.
Can you switch to webpack?
Or build your own react-lite like below:
// react-lite-with-spread-hook.js
var React = require('react-lite')
var assign = require('object.assign')
module.exports = assign({
__spread: assign
}, React)
Then use alias react-lite-with-spread-hook
for react/react-dom
.
I am actually using require.js (w/o JSX) (soon will be migrating to webpack, but not an option quite yet). I will try shimming as you suggested, thanks!
It may be a good idea to mention that react-lite only works with a JSX toolchain?
That will be good, I add the notice at https://github.com/Lucifier129/react-lite#react-lite-vs-react
awesome, thanks!