You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I am finding that certain code in React 19 causes errors in Safari versions before they added bigint support in version 14. Like this value instanceof BigInt64Array.
Vite also doesn't support Safari before version 14. I think I'm mainly seeing visitors on older iPads or other iOS devices that haven't upgraded (or can't upgrade).
I think it's possible to catch it from middleware by wrapping await next() in a try/catch and then rendering a fallback response. It might be difficult to determine which errors are from legacy browsers and which are other errors.
I also see https://uaparser.dev/ makes it pretty easy to parse a user-agent so that could be used to render different static html. I wonder if react RSC could still be used to render a completely static html response. Otherwise, maybe Hono's JSX functionality could be used to render a fallback that is guaranteed to work in all browsers. https://hono.dev/docs/guides/jsx
I wonder if there is some other type of client-side feature detection that can run early on to more gracefully handle this. Or best practice with the root html loading the entry files. Maybe there is another solution in the vite or react ecosystem.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I think I am finding that certain code in React 19 causes errors in Safari versions before they added bigint support in version 14. Like this
value instanceof BigInt64Array
.Vite also doesn't support Safari before version 14. I think I'm mainly seeing visitors on older iPads or other iOS devices that haven't upgraded (or can't upgrade).
I think it's possible to catch it from middleware by wrapping
await next()
in a try/catch and then rendering a fallback response. It might be difficult to determine which errors are from legacy browsers and which are other errors.I also see https://uaparser.dev/ makes it pretty easy to parse a user-agent so that could be used to render different static html. I wonder if react RSC could still be used to render a completely static html response. Otherwise, maybe Hono's JSX functionality could be used to render a fallback that is guaranteed to work in all browsers. https://hono.dev/docs/guides/jsx
There is @vitejs/plugin-legacy and https://cdnjs.cloudflare.com/polyfill/ but I don't think either polyfill bigint.
I wonder if there is some other type of client-side feature detection that can run early on to more gracefully handle this. Or best practice with the root html loading the entry files. Maybe there is another solution in the vite or react ecosystem.
Beta Was this translation helpful? Give feedback.
All reactions