-
Notifications
You must be signed in to change notification settings - Fork 50
WIP: BasePath #70
base: master
Are you sure you want to change the base?
WIP: BasePath #70
Conversation
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
==========================================
- Coverage 100% 95.94% -4.06%
==========================================
Files 6 6
Lines 68 74 +6
Branches 11 14 +3
==========================================
+ Hits 68 71 +3
- Misses 0 3 +3
Continue to review full report at Codecov.
|
What is the benefit of the const basepath = "demo"
// ...
<Route path={`${basepath}/topic`} render={Topic} /> |
I am sure your idea is well intended Jairo, but do you think is it that useful to most Hyperapp Router users? I am curious, but not very keen on adding this feature, at least not at first sight. 🤔 |
I'm having a separate hyperapp app as a widget: https://github.com/kidandcat/newsuncork/blob/master/src/apps/product-creator.jsx And I'm instancing it here: https://github.com/kidandcat/newsuncork/blob/master/src/components/CreateProduct.jsx I'll investigate why today, but when it loads, the location of CreateProduct.jsx's router is "/" (but the URL path is /admin/product/create) PD: I've added "WIP" to the PR name, if I find the reason of why the router is getting the initial path as "/" I will write you here. However, if at the end this is not usefull to most users, I will just close the PR and use my fork. |
@kidandcat We should add features to the Router which are impossible to add from the outside. Couldn't you solve this problem in userland? |
I couldn't do it in the userland, but I managed to do it in a much more cleaner way: |
Include Basepath