Comments (11)
try and get it to appear...
Hm, it actually should be there. Let me have a quick look.
from vike.
I cannot reproduce. When clientRouting: true
then it's defined on my side. Reproduction welcome and I'll dig into it.
FYI the Redux docs got updated yesterday: https://vike.dev/redux.
from vike.
This looks like a user land issue, not a Vike one.
from vike.
What's the assert()
line that is failing? It should be at the third stack trace entry renderPageNominal renderPageClientSide.js:105
.
from vike.
Its this: assert(!('urlOriginal' in pageContextRouted));
from vike.
Do you have 'urlOriginal'
in your passToClient
?
from vike.
Aah, it was me. I'm trying to get this https://github.com/brillout/vike-with-redux working with a generated bati project, but the "Link.tsx" is giving me an error about urlPathname is undefined, and I was tinkering with the passToClient
(and put urlOriginal
in there to try and get it to appear...
from vike.
I was looking at this bit of the docs: https://vike.dev/pageContext#built-in
On the client-side:
.
When using Client Routing, the value of pageContext.urlOriginal is the browser's current URL (window.location.href).
When using Server Routing, the value of pageContext.urlOriginal is undefined (unless you use passToClient).
from vike.
Thanks - I'll dig around and see what I'm doing wrong.
from vike.
👍 Let me know if you believe there is a bug on Vike's side. Also in case your company is up for it, we're looking for sponsors (#1350).
from vike.
Thanks. I'm not sure if it's a bug or maybe just an out-of-date example.
Minimal example here: https://github.com/chrisbu/vike-1720
Basically, bati with --react --express (plus redux react-redux packages), and then pages from this folder: https://github.com/brillout/vike-with-redux_minimal-example/tree/main/renderer into the /renderer folder.
That gives me the error TypeError: Cannot destructure property 'urlPathname' of 'pageContext' as it is undefined.
which was what I was trying to track down that led to me trying to add urlOriginal. Happy to open a new bug on the vike-with-redux... project if better place than this bug report. (also happy to help with documententation once I get my head around it...)
from vike.
Related Issues (20)
- Bug rendering after migrating to new pages format HOT 4
- `onPrerenderStart` hook not called HOT 7
- Issues using Vike with WebView IOS - Capacitor HOT 8
- Use `throw render()` / `throw redirect()` inside React/Vue/Solid components HOT 1
- New Vike Extensions
- Inconsistent Object Property Formatting in `Prerender.js` HOT 1
- I got this error after running npm run build HOT 3
- Allow STORYBOOK as env var HOT 7
- Potential Bug: Upgrade to Vike 0.4.172 Breaks HMR in Dev Mode HOT 4
- Improve environment variables support HOT 2
- Hot reloading of CSS modules HOT 1
- Could not resolve "vike-react/config" [plugin vike-esbuild] HOT 27
- vike bug HOT 2
- Git clone of vike to Mac OS causes case sensitivity error now HOT 1
- Vike bug HOT 3
- Logger assumes string HOT 2
- Code based routing
- Config inheritance bug HOT 1
- Improve Algolia search
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vike.