Skip to content
Permalink
Browse files

Merge e183bd8 into bfc39c1

  • Loading branch information
marvinhagemeister committed Mar 20, 2019
2 parents bfc39c1 + e183bd8 commit 79c79797daa924c067848ee0fdcf555d040ffa38
Showing with 4 additions and 4 deletions.
  1. +4 −4 compat/src/index.js
@@ -1,6 +1,7 @@
import { render as preactRender, cloneElement as preactCloneElement, createRef, h, Component, options, toChildArray, createContext, Fragment } from 'preact';
import * as hooks from 'preact/hooks';
export * from 'preact/hooks';
import { assign } from '../../src/util';

const version = '16.8.0'; // trick libraries to think we are react

@@ -292,7 +293,7 @@ function memo(c, comparer) {

function Memoed(props) {
this.shouldComponentUpdate = shouldUpdate;
return h(c, { ...props });
return h(c, assign({}, props));
}
Memoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';
Memoed._forwarded = true;
@@ -365,8 +366,7 @@ export {
};

// React copies the named exports to the default one.
export default {
...hooks,
export default assign({
version,
Children,
render,
@@ -385,4 +385,4 @@ export default {
PureComponent,
memo,
forwardRef
};
}, hooks);

0 comments on commit 79c7979

Please sign in to comment.
You can’t perform that action at this time.