This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-12
Channels
- # adventofcode (1)
- # announcements (6)
- # babashka (28)
- # beginners (36)
- # calva (8)
- # clj-commons (4)
- # clojure (35)
- # clojure-austin (5)
- # clojure-europe (7)
- # clojurescript (14)
- # clr (1)
- # datalevin (1)
- # fulcro (7)
- # funcool (1)
- # graphql (4)
- # helix (3)
- # hyperfiddle (4)
- # joyride (15)
- # malli (1)
- # missionary (16)
- # practicalli (1)
- # releases (1)
- # reveal (2)
- # tools-deps (14)
- # vim (9)
Hello! I'm trying to use https://github.com/molefrog/wouter with helix and when I try to call the hook useLocation
an error happens (image attached). Do you guys have any tips on how could I solve this? Or should I ditch the Wouter library?
package.json:
{
"name": "plutus",
"version": "0.0.1",
"description": "A system for managing personal finances",
"main": "index.js",
"repository": ":heset/plutus.git",
"author": "Mauricio Oliveira <tu[email protected]>",
"license": "MIT",
"private": true,
"dependencies": {
"@headlessui/react": "^1.7.10",
"@heroicons/react": "^2.0.13",
"axios": "^1.3.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-refresh": "^0.14.0",
"wouter": "^2.10.0-alpha.4"
},
"devDependencies": {
"shadow-cljs": "^2.20.19",
"tailwindcss": "^3.2.4"
}
}
based on the error message, sounds like a problem with your code. it says you're calling the hook outside of a component. without anymore info, I would advise you to look over your code and make sure that you are calling useLocation
inside of a component đŸ™‚
I'm sure the https://gitlab.com/heset/plutus/-/blob/main/src/cljs/plutus/api.cljs#L25 is called inside of a https://gitlab.com/heset/plutus/-/blob/main/src/cljs/plutus/core.cljs#L45. Perhaps because it is inside a clojure function react is having trouble instrumenting something?