Closed adamsoderstrom closed 1 year ago
Nice find @adamsoderstrom ✨ I'll look closer into this on Monday.
I think we should just remove the Page export from containers until we find a solution to this "root export" dependency cycle problem. Martin mentioned we could have an eslint rule that tells you to not do absolute imports from containers within the containers folder, but rather use relative imports.
Ah, right, @alexanderflink!
I've create another PR, which removes the export from ~/containers
(#91).
I do think Page
is more of a container
than a layout
based on current definitions, so I would suggest like Alex says, leaving it as a container but removing the Page
export from src/containers/index.js
.
Right. Will close this, hence we won't want to move the Page
entity to the layouts
directory.
Thank you ✨
I interpret the
Page
entity to not be equal to the othercontainers
, therefore i changed it to be subsidiary to thelayout
directory. This is because thePage
entity is almost always expected to be rendered inside a layout. This solves the dependency cycle.An alternative approach would be keeping the
Page
entity as acontainer
, but not exporting it in~/containers/index.js