department-of-veterans-affairs / va-forms-system-core

VA Forms System Core will be a React library hosted in NPM that will allow engineers and designers to easily interact with Forms inside of vets-website.
https://department-of-veterans-affairs.github.io/va-forms-system-core/
6 stars 4 forks source link

[Review Page] Resolve circle dependency build warnings #601

Open bjmccotter7192 opened 2 years ago

bjmccotter7192 commented 2 years ago

Description

After reviewing some of the build logs, there is a few spots in the package that have a possible circular dependency that should be resolved and avoided for the future.

Example Build Log

⠋ Building modules
Circular dependency: src/routing/index.ts -> src/routing/Page.tsx -> src/form-data/PageContext.tsx -> src/routing/index.ts
Circular dependency: src/form-builder/index.ts -> src/form-builder/TextField.tsx -> src/form-data/index.tsx -> src/form-data/ReviewPage.tsx -> src/form-builder/index.ts
Circular dependency: src/routing/index.ts -> src/routing/Page.tsx -> src/form-data/PageContext.tsx -> src/routing/index.ts
Circular dependency: src/form-builder/index.ts -> src/form-builder/TextField.tsx -> src/form-data/index.tsx -> src/form-data/ReviewPage.tsx -> src/form-builder/index.ts
Circular dependency: src/routing/index.ts -> src/routing/Page.tsx -> src/form-data/PageContext.tsx -> src/routing/index.ts

Considerations

Tasks

Acceptance Criteria