Comments (6)
I'm confused. Every React component (I'm aware of) must be a function (either a class component or a FC).
Can you show the MWE? I tried, e.g., a class component and everything works without a flaw.
Just to be clear - if your code ends up in this part, you'd put in an object (as in typeof foo === 'object'
). Glancing over react-redux
I've also not seen an object returned, just (wrapped) functions. Maybe I'm missing something though.
from piral.
Here you go: https://github.com/SantoJambit/piral-mwe
from piral.
I've taken a deeper look and I think the issue comes with React.memo. I've updated the MWE to use React.memo instead of react-redux to reproduce the issue.
from piral.
Other react higher order components return objects as well: React.lazy, react.forwardRef.
The common part seems to be that an attribute $$typeof is present, with a value of Symbol(react.memo)
, Symbol(react.forward_ref)
, etc. respectively
from piral.
I see, thanks for figuring out a way to reproduce this. I think we can deal with the $$typeof
special prop for the moment.
According to the type definitions we have:
interface ExoticComponent<P = {}> {
/**
* **NOTE**: Exotic components are not callable.
*/
(props: P): (ReactElement|null);
readonly $$typeof: symbol;
}
So looking if $$typeof
is there and a symbol could be sufficient.
Hotfix with 0.8.1 incoming later today / tomorrow morning.
Thanks for the report! 🍻
from piral.
Landed in develop
.
from piral.
Related Issues (20)
- Emulator Website with Feed Selection
- On Invalid Config Pilet Publish Removes Source
- The index.d.ts of a Pilet Is Placed In dist
- Improve Toggle / Disable+Enable in Debug Tools
- Optional Shadow DOM Isolation HOT 1
- PiletApi's `once` throws when `this` context is `undefined` HOT 6
- This is Evil
- Piral with Rush HOT 16
- How do I configure this with Nuxt 3? Unable to setup HOT 4
- Remove Pilet-Only Settings When Debugging Piral Instance
- In the app-shell example debugging mode, saving package.json will prompt that the port is used HOT 6
- Navigation storm in angular pilets HOT 1
- Multiple Angular Extensions params HOT 4
- piral-ng: Cannot read properties of null (reading 'bindingStartIndex') HOT 3
- piral-breadcrumbs dependency on react-router v5 HOT 3
- Piral-Cli uses deprecated package HOT 2
- Repeat to connect to the server HOT 5
- Possibility to Define Vue 3 Plugins HOT 15
- Support Standalone Bootstrapping API in piral-ng HOT 1
- `.krasrc` resolution from `process.cwd()` folder HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from piral.