A4-Preact
Undo Declarative Reactive Effects. Use Preact components. You may use Preact Signals library. You may not import or use the React compatibility mode (preact-compat), and you may not use the Redux module.
-
Your index.html file may only have a single
<div id="app"/>
element in the body and thescript
element to load your module for Vite to run. -
You may not include or import modules or packages other than what are installed by Vite for Preact with TypeScript, the Preact signals package, and the TailwindCSS package.
-
There should only be one script tag in your index.html to load your main.ts module.
For the form part look at the
ControlledConditional.tsx
. We let user to type, but doesn't change the signal.
Do I need to change it to Canvas.tsx
component??? Try putting the addEventListener with the return()
in the useEffect. Might help with select. (Update: Didn’t end up using it)
Bugs
- Selects a square, then deselect it, and select again. Square doesn’t appear on the rightView. Form does appear
- ~~Signals doesn’t work, so I use UseEffect with AddEventListener instead…
- Still bug with undo/redo
Todos
- Fix toolbar CSS
- Fix Statusbar text
- Get rid of the borders for debugging CSS
- Make square on right a square.
- Fix undo/redo on delete
- Do granularity (didn’t end up doing it, lost a mark)
- Why is form undo/redo not working for hue…