4 ms·
I use Preact without reactivity. That way we can have familiar components that look like React (including strong typing, Typescript / TSX), server-side renderin
by tobyhinloopen 7mo ago
I use Preact without reactivity. That way we can have familiar components that look like React (including strong typing, Typescript / TSX), server-side rendering and still have explicit render calls using an MVC pattern.
- yde_java 7mo agoHow and when do your components update in such an architecture?
- gr4vityWall 7mo agoFrom what I can tell, they do full page reloads when visiting a different page, and use Preact for building UIs using components. Those components and pages then get rendered on the server as typical template engines.
- tobyhinloopen 7mo agoView triggers an event -> Controller receives event, updating the model as it sees fit -> Controller calls render to update views Model knows nothing about controller or views, so they're independently testable. Models and views are composed of a tree of entities (model) and components (views). Controller is the glue. Also, API calls are done by the controller. So it is more of an Entity-Boundary-Control pattern.
- threatofrain 7mo agoCould you show an example?