The structure on this article is very similar. In my case, I don’t have a “shared” folder. Any component defined by a parent can be used by any of its children.

/src
/components
/Button.js
/scenes
/Register
/components
/SuperButton
/components
/SuperGreenButton
/index.js
/index.js
/index.js

The SuperButton.js can use Button.js, but not the reversed. Register/index.js can use SuperButton.js because it defined directly by Register. SuperGreenButton.js can only be used by SuperButton.js.
Parent entities will never use a component defined by a child entity.

Hopefully this helps.

Javascript Application Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store