Skip to content

Spec generation fails when React.cache is used #192

@markedwards

Description

@markedwards

This is related to #181 which is closed.

We are running into increasingly show-stopping issues as we scale up our codebase, where next-rest-framework generate or next-rest-framework validate break if they touch any file which doest import { cache } from "react" and calls it to wrap a function.

We've had to resort to dynamic imports to avoid the problem, but that leads to strange behavior like next-rest-framework generate hanging. It's very time-consuming and difficult to debug this.

React.cache is a very useful and common tool. Is there any possibility of next-rest-framework tolerating its use? Is there any better workaround that can be suggested?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions