#3562·react-pdf

Unable to set flexShrink to 0

Author: piotrbaldych-crCreated Sep 10, 2026Updated Sep 10, 2026

Describe the bug Due to implementation of setFlexShrink when 0 is passed it defaults back to 1

https://github.com/diegomura/react-pdf/blob/ca8a425bdfb9a8ab9b26e724cd747431372fe147/packages/layout/src/node/setFlexShrink.ts

To Reproduce Create element with flexShrink set to 0

REPL repro

Expected behavior Element does not shrink. Same as when 0.001 is passed

Screenshots Image