Closed toshimo closed 4 years ago
You can easily clone an instance via snapshots. Take a look here for a helper method that does exactly that.
import { clone } from 'mobx-keystone';
const clonedArticle = clone(article);
Oh my, apologies. I don't know why I wasn't able to find it. I gave it a shot and it exactly solved my problem. Thanks a lot!
Hi, I'm really impressed by how great this library is! I would say the keystone (and mobx) makes me more fun to code than other libraries.
Now, I'm wondering what is the right way to go if you want to duplicate an instance which has a different $modelId. I hope I'm not missing something. What I would like to do is something like this (simplified):