Skip to content
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

[Bug?]: routeData() and useRouteData() not propagating data through file route path #1100

Closed
2 tasks done
chris31415926535 opened this issue Oct 27, 2023 · 1 comment
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@chris31415926535
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

As documented (here)[https://start.solidjs.com/core-concepts/data-loading] and (here)[https://start.solidjs.com/api/useRouteData], as we move from stem to leaf down the route, useRouteData() should provide lower routes with access to data defined at higher routes. In addition (or as the mechanism for doing this?) the previous routeData()'s data should be exposed via the { data } element of RouteDataArgs.

Expected behavior 🤔

Lower routes do not have access to data from higher routes. In addition, inside a lower route's routeData({data}: RouteDataArgs){ }, the destructured value of { data } is undefined, suggesting that lower routes are indeed not able to access data from higher routes.

Steps to reproduce 🕹

A minimal reproducible example is provided at this Github repository: https://github.com/chris31415926535/another-routedata-test.

Context 🔦

I'm loving solidstart but have hit a real wall here--any help would be appreciated.

If this isn't a bug, if you can point me in the right direction I'll gladly contribute a working example to the documentation.

Your environment 🌎

{
  "name": "another-routedata-test",
  "scripts": {
    "dev": "solid-start dev",
    "build": "solid-start build",
    "start": "solid-start start"
  },
  "type": "module",
  "devDependencies": {
    "@types/node": "^18.17.5",
    "esbuild": "^0.14.54",
    "postcss": "^8.4.28",
    "solid-start-node": "^0.3.8",
    "typescript": "^4.9.5",
    "vite": "^4.4.9"
  },
  "dependencies": {
    "@solidjs/meta": "^0.28.6",
    "@solidjs/router": "^0.8.3",
    "solid-js": "^1.8.3",
    "solid-start": "^0.3.8"
  },
  "engines": {
    "node": ">=18"
  }
}
@chris31415926535 chris31415926535 added the bug Something isn't working label Oct 27, 2023
@ryansolid
Copy link
Member

In setting up for SolidStart's next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed by mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.

See #1139 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants