Comments (7)
Sounds like a bug in hoist-non-react-statics.
However, I would consider removing this dependency as it's lagging a little behind everchanging requirements.
from loadable-components.
Sounds like a bug in hoist-non-react-statics.
However, I would consider removing this dependency as it's lagging a little behind everchanging requirements.
@theKashey For sure, how do I remove the dependency? And would the plugin work without it? Would I have to substitute it with anything?
from loadable-components.
The change is required from within loadable.
However can you try debug the issue as there should be a reason why this functionality blows up, something very particular.
from loadable-components.
The change is required from within loadable.
However can you try debug the issue as there should be a reason why this functionality blows up, something very particular.
@theKashey Oh, as in someone would need to commit a change to the loadable repo? And yes, it seems to be the importing of react-p5-wrapper that blows it up, but I cannot see any reason why it would be interpreted as a simple string. Any workarounds you know of that do the same thing as loadable-components? I'm using Gatsby and having a very hard time getting my p5.js files to do SSR. Also quite new to react/node/gatsby
from loadable-components.
..... because you are expected to do import { ReactP5Wrapper } from "react-p5-wrapper";
- a named, not default export.
just change your code a little
import loadable from "@loadable/component"
const LoadableP5 = loadable(() => import('react-p5-wrapper'), {
resolveComponent: ({ReactP5Wrapper}) => ReactP5Wrapper,
});
see https://loadable-components.com/docs/api-loadable-component/#optionsresolvecomponent
from loadable-components.
..... because you are expected to do
import { ReactP5Wrapper } from "react-p5-wrapper";
- a named, not default export.just change your code a little
import loadable from "@loadable/component" const LoadableP5 = loadable(() => import('react-p5-wrapper'), { resolveComponent: ({ReactP5Wrapper}) => ReactP5Wrapper, });see https://loadable-components.com/docs/api-loadable-component/#optionsresolvecomponent
@theKashey Hm, its loading now, but when I switch pages and return it doesnt reload, the sketch is just stuck as 'loading', does that have anything to do with loadable-components? Also, thank you so much for the advice!
Here are the errors in the console:
GET http://localhost:8000/about/[object%20Object] 404 (Not Found)
head-export-handler-for-browser.js:72 TypeError: o.indexOf is not a function
at eval (p5.min.js:2:1)
from loadable-components.
Yeah, I am not sure loadable is a problem here, as well not sure it can be a solution - the new problem seems to be originated in P5.
from loadable-components.
Related Issues (20)
- problem with redial HOT 2
- How to change referencing external styles to preload mode
- What is the best way to prevent failure to load component or catch properly? HOT 7
- getting Uncaught TypeError: Failed to resolve module specifier HOT 1
- loadable/component Synchronously Load Component Failed with Error "Cannot convert undefined or null to object HOT 2
- SassError: Undefined variable HOT 1
- Inline Chunk injection HOT 2
- Not working with latest @loadable/server & @loadable/babel-plugin `v5.16.0` version HOT 4
- How to lazyload a hook? HOT 3
- Fallback behaviour HOT 1
- Main.js is rendered on every page even if I splitted each page into chunks with @loadable/component
- error in ./node_modules/@loadable/component/dist/loadable.esm.mjs HOT 9
- Why ChunkExtractor is required? HOT 3
- Is website sync with repo?
- If I am using react18, do I still need loadable-components HOT 6
- Add esbuild support HOT 3
- react-native-web SSR support HOT 1
- Loading state is always true on first render HOT 3
- Add query parameter support HOT 3
- SSR is broken for component v5.16.2+ HOT 6
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 loadable-components.