Skip to content

Factory create duplicates in react-typescript exemple #10

Open
@clementoriol

Description

@clementoriol

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions