- Issue created by @bnjmnm
- πΊπΈUnited States effulgentsia
Umami JSX predates some of the exploration we did in https://github.com/drupal-jsx/starter-react. There, we used Vite, so could use Vite's glob function: https://github.com/drupal-jsx/starter-react/blob/main/src/index.js#L5.
However, there the components are all flat in the
src/components
directory. Not sure if that's ideal, we might want to prefer Umami's / Olivero's way of organizing templates by category directories.Also, lately I've been second guessing the trying to use PascalCase for the component filenames, and I wonder if it would be better to just name the files exactly like the Twig files would be named. So for example, perhaps
layout--threecol-section.jsx
would be a better name thanDrupalLayout--ThreecolSection.jsx
? My original reason for wanting PascalCase was to make the JSX components feel more like regular React components and less like a Drupal-quirky thing, except the thing is they're already Drupal-quirky things because the shape of the props comes from Drupal, so perhaps by naming them with Drupal's standard kebab-case, we would actually simplify the mental model by even more clearly distinguishing JSX files that represent Drupal templates from the app's other JSX components?