If a React developer is concerned about code size they can use Preact which is about 5kB: 3kB for Preact core [1], and 2kB for preact-compat [2].
[2] "preact-compat adds somewhere around 2kb to your bundle size, but has the advantage of supporting the vast majority of existing React modules you might find on npm" https://preactjs.com/guide/v8/switching-to-preact/