Doesn't it work with the .js file? #523
-
-------- test.js -------------- export const goTest = () => { It works well with the .svelte file. [ routify ver 2.18.8 ] |
Beta Was this translation helpful? Give feedback.
Answered by
jakobrosenberg
Jul 27, 2023
Replies: 1 comment 1 reply
-
In JS you have to use it like a normal store, eg. import { goto } from '@roxi/routify';
import { get } from 'svelte/stores'
const $goto = get(goto)
$goto('/') Testing for R3 should be much improved. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
juliam73
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$
has no meaning in vanilla JS, but when you use it in .svelte files, it gets compiled into JS.In JS you have to use it like a normal store, eg.
Testing for R3 should be much improved.