Plan: require class encapsulation for stateful components
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
9
plan.md
9
plan.md
@@ -116,6 +116,15 @@ collisions with host app styles. The host can override via CSS custom properties
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Code Structure
|
||||||
|
|
||||||
|
All stateful components must be classes, not bare module-level variables. The
|
||||||
|
current `app.mjs` has scanner state (`running`, `last_decoded_text`, `fps`,
|
||||||
|
etc.) scattered as module globals — this needs to be encapsulated in
|
||||||
|
`Barcode_Scanner` before the library refactor proceeds. Module scope is only
|
||||||
|
for constants and exports.
|
||||||
|
|
||||||
|
|
||||||
## Lifecycle
|
## Lifecycle
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user