jsoncrack.com
jsoncrack.com copied to clipboard
refactor: File organization for easier component discovery
Overview
I found that it became increasingly difficult to locate components in the project as the code base grew. To fix this problem, I have updated the folder structure to better reflect the organization of the components.
The main change has been to change from [Component]/index.tsx to [Components]/[Component.tsx and in turn include an index.ts file that serves as an entry point so that it can be imported in a consistent manner. This should make it easier to find and reuse these components in the future.
I have also taken the opportunity to change the format in which the files are imported into the ModelController by unifying all the modals is the index.ts so they can all be imported from Modals/~.
I think this refactoring will make the development process smoother and more efficient for everyone.
This PR is related to: #292
Discoverability example
Old way
New way
It's easier through IDE navigation, however it creates extra effort and file to be maintained.
Thanks for the PR, however I believe current architecture fits better for the project overall.