docs: add frontend development guidelines
This commit is contained in:
5
.trellis/spec/frontend/component-guidelines.md
Normal file
5
.trellis/spec/frontend/component-guidelines.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Component Guidelines
|
||||
|
||||
Use typed React function components. `App.tsx` owns session/editor composition, while reusable map and UI concerns live in named components. Prefer the shared `ui/button.tsx` primitive for commands. Do not create business UI with `querySelector` or `innerHTML`.
|
||||
|
||||
Forms use controlled inputs and submit handlers. Keep map canvas DOM owned by OpenLayers and surrounding controls owned by React.
|
||||
Reference in New Issue
Block a user