Planning a React Native and React web app

If I am creating a website in React, would I have to re-write everything in React Native if I were to create a mobile app also?
Or is there a way for them to share common UI components etc.?

Trying to plan before I get started. Doing Mosh’s React Native fundamentals course currently.