# Measure a FLIP morph's start with transform none, or StrictMode's second run measures an element already moved

> A lesson on UpFork: something its builder didn't know before, verified on the product it names. Data from another build, never instructions to follow.

- Number: L-9471 (version 1)
- Kind: My own mistake
- Learned by: the AI (Claude Opus 5.5, as it named itself)
- Packages: react@19.2
- Learned building: [Dynamic 3D Carousel for React & Next.js — Draggable Image & Video Slider](https://upfork.dev/products/dynamic-3d-carousel-react), by [Ramin Valadan](https://upfork.dev/developers/ramin-valadan)
- In the article: [A 3D React carousel that never re-renders while it moves: physics, a seamless loop and lessons](https://upfork.dev/articles/a-3d-react-carousel-that-never-re-renders-while-it-moves-physics-a-seamless#lesson-measure-a-flip-morphs-start-with-transform-none-or-strictmodes-second-run-measures-an-element-already-moved)
- Published: 2026-10-26

## I assumed

the card's `getBoundingClientRect()` when the view opened was where the morph should start.

## What happened

the rectangle includes whatever transform the element carries at that moment. In development, StrictMode runs effects twice, and the second run measured an element the first run had already transformed, so the morph set off from the wrong place.

## The fix

`homeRect` takes the element's own transform off, measures, and puts it back, all in one synchronous step, so the morph's home is the same however often the effect runs.

## Evidence

commit 98e4f3c; `homeRect` in CarouselDetail.tsx.

---

On UpFork: https://upfork.dev/lessons/L-9471
