Open ohute-couture opened 5 years ago
Can confirm this is also occurring with our app, but not sure how to replicate it at the moment.
The problem seems to be that in Preact X, props.children
is no longer guaranteed to be an array, and in this case, if you're passsing a single child, props.children
is a VNode.
There's this in src/compat.js
:
export const Children = {
only(children) {
return children && children[0] || null;
}
};
Here children[0]
doesn't exist. Should be something like
export const Children = {
only(children) {
if (Array.isArray(children))
return children[0]
else if (children && typeof children === "object")
return children
else
return null
}
};
For those working with X, try using react-redux
and preact/compat
. Hopefully this will be fixed soon.
Hey!
Could you guys test preact-redux's master?
I suspect that my PR, #41, fixes the problems related to Preact Redux but I'm not 100% sure of that, and the test suites would need to be adapted to support Preact X..(so breaking the compatibility with Preact 8), which I will try to fix in the next weeks.
@fjorgemota Any Updates regarding the fix.
I can't use react-bootstrap4-modal
package with preact-redux
.
It works fine without connect
.
To anyone interested on this issue: could you test if the PR #48 works for you?
When merged that PR should fix this issue, I think.
Preact, 10.0.0-alpha.2 preact-redux is not working, react-redux work properly
There is No Error, Just There is
<Provider/>
without children(<App/>
) Check Plz