DEV Community

Discussion on: The Command Design Pattern in JavaScript

Collapse
 
orelkan profile image
Orel Kanditan • Edited

Nice article, but the rename bug could be caught be using Typescript, or generally using a strongly typed language and not accessing public members using strings like 'sex'.

It would be easier to simply pass a function than to create a command object it seems. It might be useful for undo functionality