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

"A" Element Breaks SSR #369

Closed
only-cliches opened this issue Feb 7, 2024 · 1 comment
Closed

"A" Element Breaks SSR #369

only-cliches opened this issue Feb 7, 2024 · 1 comment

Comments

@only-cliches
Copy link

Describe the bug

When attempting to render a route with the "A" element inside the render path, the following message is displayed on the server console: "SSR currently does not support spread children." and the A tags are not rendered correctly to the SSR HTML.

I inspected the solid-js source code and found the error is called when the following function is used: ssrSpread. I searched the compiled output of my application and found the use of this method in one place: inside the A component of the router.

The culprit appears to be here:

Your Example Website or App

https://github.com/only-cliches/solid-ssr-workbench

Steps to Reproduce the Bug or Issue

  1. Clone the repo
  2. Run npm i and npm run build:async && npm run start:async
  3. Visit localhost:8080 in your browser. Observe the anchor tags in the header did not render the text contents, and do not function as they're supposed to.
  4. Visit the console where you launched the start:async script and observe the "SSR currently does not support spread children.", one for each A component.

Expected behavior

A tags should not cause an issue with SSR and should render correctly with SSR.

Screenshots or Videos

No response

Platform

N/A

Additional context

No response

@only-cliches
Copy link
Author

Did not have latest version of babel-preset-solid installed, that resolved the issue. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant