|
|
|
|
|
by stickyricky
1612 days ago
|
|
Whats the purpose of sharing types? Define entities on each and leave behavior as a domain consideration. Clients should be disposable and decoupled. If you want to render html on the server that's fine but svelte isn't the best choice for that. |
|
Server sends data as JSON to the client. Client parses JSON. Both now have the exact same data shape. Shared TS types let you use the same representation for the same data no matter where.