Can you use code Patterns in JavaScript/nextjs?

I am trying to learn a JS and so far all my experience with coding has been with languages like java, and C#. I want to add a undo and redo option to the website I'm making in nextjs. I wanted to use the command + memento pattern to do so. I noticed that these patterns seem awkward to implement in JS though, so I was wondering if there is a JS version of these patterns I'd need to find, or if I should try a something different entirely.

Posted May 12, 2026, 6:13 AM UTC

24
Loading comments…