-
Notifications
You must be signed in to change notification settings - Fork 40
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
changes to work with svelte 4. #112
base: main
Are you sure you want to change the base?
Conversation
Hi @mefechoel, |
Something not quite right is happening here.
in Main.svelte is not firing. |
Hi @mefechoel,
Should the onChange call to appChange have a parameter of state? I wonder if svelte 4 is stricter. In svelte 3, clicking on an about link changes the url and that causes the Route tag to do a conditional render. But in svelte 4 this is not happening. An enter or refresh does cause a conditional render. But that is an extra step. I added a console.log in appChange and clicking a link does not cause it to fire. Should it fire on a link click? |
Bit more information. And the same using svelte 4 So $location is not updated. Plus we do not get to Router in order to change history |
At least temporarily, you can override svelte-navigator dependency on svelte in package.json to use the library because it does work on svelte 4. "overrides": {
"svelte-navigator": {
"svelte": ">=4.x"
}
} |
I think there is something wrong with the test app. I have run navigator with svelte 3 and 4 in parallel and the returned object from createHistory is the same in both but code like notifyListeners is not called in the svelte 4 version. I know my javascript skills are not good enough to work out is going on here. I think as a short term fix, @alexandermontillarivera has the right idea and for longer term then moving to sveltekit is the answer. |
Why this Repository is in Pending for a longtime.. @mefechoel if you think you can't mantain this repo. please transfer ownership to someone who can actively manage. |
@MrBns - but who can actively manage? I can't get the tests to pass though the changes allow my svelte 4 app to run. But I can't work out if the tests are no longer relevant or are finding a deep gotcha in the changes. |
Would anyone like to work with me on this. I would really like to get this to pass the tests. |
Tests now run - all passed Problem was rollup in test app eslint - svelte3 -> svelte4 I also added examples to eslint ignore because problems had been skipped by using ignore eslint line in file which is not working with the replacement eslint-plugin-svelte Prettier files changed too
Tested in my application but is there a test suite?