-
Notifications
You must be signed in to change notification settings - Fork 88
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
V2 #19
Comments
What are your thoughts on using svelte context api? Simply passing url() via props has a limitation for deeply nested components (non-"routed" components). Having come from the React ecosystem I think one of the real productivity jump starters is the maturity of ReactRouter and it's status as a defacto standard there. I think it's useful to keep It seems reasonable to think of the project as a few different things:
A person should be able if they so choose to use the route config generator with a "bring your own router components" model. This project's components can gain an advantage through tighter integrations with the generated config which a person would have to build for themselves otherwise. |
@matthewrobb some good points there. Context api Only concern is, the context api isn't reactive and passing a store isn't an option with the current store/transition bug, so the question is: Do we need the context to be reactive? At the top of my head, no. Name My gripe with the current name isn't the Svelte prefix, but the What do you think of svelte-routify? It's shorter, IMO more descriptive and sexier. Build system The CLI functions the same was as sirv in the way that you simple add it in to the |
Build system Name Context API |
One bit of reactivity that I missed. Between passing route through all props and using a store, I think I'd prefer the store. Anything else would require too much boilerplate. |
HelpersI Haven't found a silver bullets for helpers so far. Option A) create core module Option B) create helpers module Option C) expose routes example<script>
import { Router } from "@sveltech/routify";
import { routes } from "@sveltech/routify/tmp/routes";
</script>
<Router {routes} /> Options D) Props Current obstacles. |
Hello I have a problem. but it didn't work for me with routify I have tried different things in my app.svelte: then he left ne true and put the links like this
some help? |
With all the new features of the v1.4.x-beta, I think it might be time to move on to a new major release. 1.4 features listed below:
I have some thoughts and ideas outlined below. Nothing is set in stone and all feedback welcome.
Ideas for v2
Name: Routify
I never liked the name svelte-filerouter much. It was just a quick name for an ad hoc project. The project has since grown and I think it deserves a "proper" name now.
Home: github.com/grottolabs (or something more svelt'ish?)
Helpers:
Make the url helper context aware to support relational routes based on current file. Can this be done through import without adding extra boilerplate? If not, restrict the url so it's only accessible as a prop -This would also sort circular dependency warnings.
Page props
We currently have
route
,routes
,url
,_routeOptions
,scoped
andcomponents
"poluting" every page. Should we combine them all in one object, prefix them or do both?"scoped" prop
I'm not sure how I feel about this one. Should page props be passed as any other prop instead? Can it be done programmatically? Route.svelte I'm looking at you.
Separate rollup/webpack plugins
#18
Does Rollup/Webpack/Parcel still serve a purpose for this project?
Custom routes
There's technically nothing in the way of being able to pass custom routes to . Would this be a good feature though?
Query parameters in route object
#5
Hash based routing
#22
Since the file-router maps resources to paths like a traditional router, I don't see much point in hash based routing. However, it would be a nice feature to have for those who prefer.
EDIT: Added hash based routing suggestion.
That's for it now. What do you think?
The text was updated successfully, but these errors were encountered: