Comments (3)
Were taking a look on this, hard to reproduce since it happens in SSR deploy and first load (when server starts and delivers the first render).
Anyway, a fast fix lies in context.environment.client
:
class Application extends Nullstack {
showDefault = false
possiblyInvalidUrl = '/invalid.png'
render({ environment }: NullstackClientContext) {
return (
<>
{this.showDefault && <h1>Default!!</h1>}
{environment.client && (
<img src={this.possiblyInvalidUrl} onerror={{ showDefault: true }} />
)}
</>
)
}
}
from nullstack.
I am new in contribution can you tell me where to find this above line, so that I can give it a try to solve the issue.
from nullstack.
Heyo, sorry for the late response (/ω\),
This issue is probably happening during the hydration process, but it is a bit more complicated than it looks like.
Right now the way Nullstack loads quickly is by being plain HTML untill all the paints are done, and this error raises during paintint, the best i can think of to solve this without tradeoffs would be to update the client/render.js and maybe client/rerender.js to try load the image again and if an error happen trigger the onerror event again
from nullstack.
Related Issues (20)
- M1 Mac issue with node v16 fiber HOT 3
- this.renderNullstack returning undefined HOT 1
- Does support a vite template? HOT 1
- Typescript error: Not export *.d.ts types HOT 2
- onfocus/onblur don't work together on production mode HOT 2
- textarea attribute "disabled" won't update it's value when tied to nullstack state HOT 1
- meta tag description is no longer updated HOT 1
- Textarea doesn't accept bind as undefined HOT 2
- M1 - postcss loader breaks HOT 5
- Description header not be apply HOT 5
- .env variables not be referenced as a value HOT 2
- Using spread operator in combination with onclick on tag prop breaks the build HOT 3
- 🐛 Error thrown when using exposed server function with HTTP POST method HOT 1
- Output folder is not being cleaned up with --disk flag HOT 1
- Comments not being respected by sass-loader HOT 1
- Refs are not properly typed HOT 1
- 0.18+ not reloading function components HOT 2
- Fix conflict with invokerHash and boundHash separator HOT 1
- Please help HOT 2
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 nullstack.