Factory create duplicates in react-typescript exemple
Hi,
I was looking around in the example files to get a better understanding on how to get type-safe factories, and realized that the factory in the react-typescript always creates the same object.
I was expecting :
server.createList("person", 20);
to create 20 unique Person objects, but it creates 20 identical ones.
Is this expected ? Modifying the factory to use regular functions instead of getters works, but I'm a bit confused about how to type it properly.
I have the same issue. I'm ha ving some trouble figuring out how to modify it to show different people.
Hey @GregBelle , found a way to fix it, you can check what I did on my PR: https://github.com/miragejs/examples/pull/11
@clementoriol Thanks! I copied in your updates locally and was able to follow the pattern for my own factory.