Skip to content

List react-query v4 as a peer dependency #134

Open
@IsaacLeeWebDev

Description

@IsaacLeeWebDev

Is your feature request related to a problem? Please describe.

Right now, this tool generates code that imports react-query like this:

import { UseQueryResult } from "@tanstack/react-query";

These imports don't work if you've installed a version of react-query before v4, whose imports have to look like this:

import { UseQueryResult } from "react-query";

Describe the solution you'd like
List react-query v4 and up as a peer dependency of this package

Describe alternatives you've considered
This tool could also support generating v3-style imports with a CLI option. That said, I could see how supporting old versions of react-query could go far beyond this one incompatibility, and I could see officially how providing that support could potentially significantly increase the maintenance demand of this package.

I suppose I could also run a string-replace to change @tanstack/react-query to react-query on every generated file.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions