Skip to content

react project -> create new playground -> use is seen as a react hook and throws error #952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jessewriter opened this issue Feb 16, 2025 · 1 comment

Comments

@jessewriter
Copy link

jessewriter commented Feb 16, 2025

Bug Report

Current Behavior

create new playground uses the method 'use' which in a react project throws an error as use can only be used inside of a react hook

unable to start playground

Code/Gist

use(yourDb);

Expected Behavior/Code

don't use the function keyword 'use'

Environment

Version: 1.97.2
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Linux x64 6.12.13-200.fc41.x86_64

Possible Solution

to fix github co-pilot solved for me by replacing use with db.getSiblingDB(yourDB)

Additional Context/Screenshots

@gagik
Copy link
Contributor

gagik commented May 7, 2025

Is this an error reported by eslint or another linter? If so, this is specific to your workplace configuration and can be fixed by adding the file as an exception in your linter configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants