Skip to content

[Question] Initial value as array generates unnecessary new field #265

Open
@DedeKurnn

Description

@DedeKurnn

I'm using Qwik and I'm trying to get initial value of type array using route loader, but it generate these unnecessary additional fields with dot notation which mess up the validation.

      const response = await fetchData({
        requestEvent,
        endpoint,
      });

      return {
        dialect_id: response.data.dialect_id // this is array of string,
        bahasa_indonesia: response.data.bahasa_indonesia,
        bahasa_lampung: response.data.bahasa_lampung,
        sentence_lpg: response.data.sentence_lpg,
        sentence_id: response.data.sentence_id,
        region_id: response.data.region_id // this is array of number,
        status: "pending",
      };

image

I do not want this behavior. How do I solve this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions