<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/whenmounted-and-bigint-props-in-inertia-js-v3-8-1o9my3tiz" -->

---
title: WhenMounted and BigInt Props in Inertia.js v3.8 | daily.dev
description: Inertia.js v3.8.0 adds a WhenMounted component for rendering browser-only code safely under SSR across React, Vue, and Svelte adapters, plus opt-in support for...
canonical: https://daily.dev/posts/whenmounted-and-bigint-props-in-inertia-js-v3-8-1o9my3tiz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: WhenMounted and BigInt Props in Inertia.js v3.8 | daily.dev
og:description: Inertia.js v3.8.0 adds a WhenMounted component for rendering browser-only code safely under SSR across React, Vue, and Svelte adapters, plus opt-in support for...
og:url: https://daily.dev/posts/whenmounted-and-bigint-props-in-inertia-js-v3-8-1o9my3tiz
og:image: https://api.daily.dev/og/posts/1o9my3tiz.png
og:image:alt: WhenMounted and BigInt Props in Inertia.js v3.8
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# WhenMounted and BigInt Props in Inertia.js v3.8

**[Laravel News](https://daily.dev/sources/ln)** · 5 min read · 0 upvotes · 0 comments

## Summary

Inertia.js v3.8.0 adds a WhenMounted component for rendering browser-only code safely under SSR across React, Vue, and Svelte adapters, plus opt-in support for 64-bit integers as native BigInt values to avoid precision loss on large IDs. The release also fixes Form component callbacks (onHttpException, onNetworkError, onBeforeUpdate, onFlash) that weren't being forwarded, resolves a race condition where stale optimistic responses could revert newer updates, and fixes history restoration ignoring asset versions across deploys.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://laravel-news.com/inertia-3-8-0>

## Questions this post answers

### How do I render browser-only code like window.innerWidth in an Inertia.js component without breaking SSR?

Inertia.js v3.8.0 adds a WhenMounted component, available for React, Vue, and Svelte adapters, that renders a fallback during server-side rendering and the first hydration render, then swaps in the real children once the component has mounted in the browser. In React, pass children as a function (not JSX) so window or document access does not execute during SSR, since JSX children evaluate before the component renders.

_daily.dev surfaces framework-adapter release details like this for developers hardening SSR apps._

### How does Inertia.js v3.8 handle 64-bit integers like Snowflake IDs that exceed JavaScript's safe integer range?

Inertia.js v3.8.0 adds opt-in support for encoding large PHP integers as native JavaScript BigInt values instead of regular numbers, preventing precision loss such as 900719925474099988 silently rounding to 900719925474100000. It requires inertia-laravel v3.5.0 and is enabled via the preserve_big_integers config option, the INERTIA_PRESERVE_BIG_INTEGERS env variable, or per-response with ->preserveBigIntegers(); values round-trip as digit strings compatible with Laravel's integer validation.

_developers wiring up Snowflake-style IDs in Laravel and Inertia can track fixes like this on daily.dev._

### Why don't my Inertia Form component's onHttpException or onNetworkError callbacks fire on a failed request?

In Inertia.js versions before 3.8.0, the Form component accepted onHttpException, onNetworkError, onBeforeUpdate, and onFlash as props but never actually forwarded them to the underlying visit, so they silently never fired on an HTTP 500 or network failure. Version 3.8.0 fixes this forwarding so these callbacks behave the same as they already did on useForm, and returning false from an error callback stops the default handling.

_daily.dev helps developers debugging Inertia Form callback gaps stay current on fixes like this._

## Similar posts on daily.dev

- [Inertia.js v3.0.0 Is Here with Optimistic Updates, useHttp, and More](https://daily.dev/posts/inertia-js-v3-0-0-is-here-with-optimistic-updates-usehttp-and-more-wwmxp0dew) · Laravel News · 17 upvotes · 0 comments
- [Inertia.js v3 Is Now in Beta](https://daily.dev/posts/inertia-js-v3-is-now-in-beta-jufdwlnjl) · Laravel · 25 upvotes · 0 comments
- [The Inertia v3 Beta is Here](https://daily.dev/posts/the-inertia-v3-beta-is-here-sxjypoag5) · Laravel News · 33 upvotes · 1 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#react](https://daily.dev/tags/react), [#laravel](https://daily.dev/tags/laravel), [#vuejs](https://daily.dev/tags/vuejs)

[View this post on daily.dev](https://daily.dev/posts/whenmounted-and-bigint-props-in-inertia-js-v3-8-1o9my3tiz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"WhenMounted and BigInt Props in Inertia.js v3.8","url":"https://daily.dev/posts/whenmounted-and-bigint-props-in-inertia-js-v3-8-1o9my3tiz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/whenmounted-and-bigint-props-in-inertia-js-v3-8-1o9my3tiz"},"datePublished":"2026-10-02T15:00:13.650Z","dateModified":"2026-10-02T15:01:52.389Z","description":"Inertia.js v3.8.0 adds a WhenMounted component for rendering browser-only code safely under SSR across React, Vue, and Svelte adapters, plus opt-in support for...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bff104a886f6da9162722d5dd28393ca?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bff104a886f6da9162722d5dd28393ca?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Laravel News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Laravel News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ln","url":"https://daily.dev/sources/ln"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/whenmounted-and-bigint-props-in-inertia-js-v3-8-1o9my3tiz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,react,laravel,vuejs","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Laravel News","item":"https://daily.dev/sources/ln"},{"@type":"ListItem","position":3,"name":"WhenMounted and BigInt Props in Inertia.js v3.8"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/whenmounted-and-bigint-props-in-inertia-js-v3-8-1o9my3tiz#faq","mainEntity":[{"@type":"Question","name":"How do I render browser-only code like window.innerWidth in an Inertia.js component without breaking SSR?","acceptedAnswer":{"@type":"Answer","text":"Inertia.js v3.8.0 adds a WhenMounted component, available for React, Vue, and Svelte adapters, that renders a fallback during server-side rendering and the first hydration render, then swaps in the real children once the component has mounted in the browser. In React, pass children as a function (not JSX) so window or document access does not execute during SSR, since JSX children evaluate before the component renders. daily.dev surfaces framework-adapter release details like this for developers hardening SSR apps."}},{"@type":"Question","name":"How does Inertia.js v3.8 handle 64-bit integers like Snowflake IDs that exceed JavaScript's safe integer range?","acceptedAnswer":{"@type":"Answer","text":"Inertia.js v3.8.0 adds opt-in support for encoding large PHP integers as native JavaScript BigInt values instead of regular numbers, preventing precision loss such as 900719925474099988 silently rounding to 900719925474100000. It requires inertia-laravel v3.5.0 and is enabled via the preserve_big_integers config option, the INERTIA_PRESERVE_BIG_INTEGERS env variable, or per-response with ->preserveBigIntegers(); values round-trip as digit strings compatible with Laravel's integer validation. developers wiring up Snowflake-style IDs in Laravel and Inertia can track fixes like this on daily.dev."}},{"@type":"Question","name":"Why don't my Inertia Form component's onHttpException or onNetworkError callbacks fire on a failed request?","acceptedAnswer":{"@type":"Answer","text":"In Inertia.js versions before 3.8.0, the Form component accepted onHttpException, onNetworkError, onBeforeUpdate, and onFlash as props but never actually forwarded them to the underlying visit, so they silently never fired on an HTTP 500 or network failure. Version 3.8.0 fixes this forwarding so these callbacks behave the same as they already did on useForm, and returning false from an error callback stops the default handling. daily.dev helps developers debugging Inertia Form callback gaps stay current on fixes like this."}}]}
```

