Site suggestions #462
Replies: 12 comments
-
In VS Code is there any mint extension that would support Emmet actions in mint functions? |
Beta Was this translation helpful? Give feedback.
-
@TudorHulban There is no such extension yet. |
Beta Was this translation helpful? Give feedback.
-
@TudorHulban What do you mean by "protect routes" ? |
Beta Was this translation helpful? Give feedback.
-
We could do some checking before redirecting to a protected route, ex.: Resources: https://tylermcginnis.com/react-router-protected-routes-authentication/ . |
Beta Was this translation helpful? Give feedback.
-
Here is an example in the Mint Realworld project that describes what your looking for: |
Beta Was this translation helpful? Give feedback.
-
In Mint there is no language construct to handle this. We usually do it inside the route handler: https://github.com/mint-lang/mint-realworld/blob/master/source/Routes.mint#L82 |
Beta Was this translation helpful? Give feedback.
-
Understood. Would suggest to add this to the documentation. It is hard to the new coming user to pick up the features you offer. Would windows.navigate be the best way for the documentation example? |
Beta Was this translation helpful? Give feedback.
-
Thanks, sadly the documentation is not 100% and any input is welcome, will try to work in it in the near future.
It's neither And yes It would be the best way for a documentiation example. I reopened the issue to track the documentation requests. |
Beta Was this translation helpful? Give feedback.
-
Understood. I believe it is important to expand the router section in the main site with adding clear instructions on how to perform route protection. What are the features that you presently miss? Maybe it is a time to work also on documentation, I see features that you already developed for many months but they are not in main site documentation. I might give it another go when you also add websockets in main site. This way the solution becomes interesting to choose. Just drop me a line .... |
Beta Was this translation helpful? Give feedback.
-
@gdotdesign That's pretty verbose and not rly DRY, perhaps we could add a concept of guards, matching other routers in this regard? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure how we could DRY it up more in a language level without increasing the complexity a lot. I'm open to suggestions. |
Beta Was this translation helpful? Give feedback.
-
Not related to your question but maybe a sugar candy? |
Beta Was this translation helpful? Give feedback.
-
Hi!
Some suggestions, maybe useful.
Thank you for the nice work with mint.
This way the tab with mint site can easily remain and back is not needed (better UX).
Beta Was this translation helpful? Give feedback.
All reactions