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

docs: update solidstart examples #1525

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JesusP2
Copy link

@JesusP2 JesusP2 commented Apr 4, 2024

Noticed solidstart examples for sessions were outdated.

I decided to use event.locals instead of event.nativeEvent.context because it's what is mentioned in solidstart docs.

@pilcrowOnPaper
Copy link
Member

Looks like we just use getRequestHeader() etc?

https://vinxi.vercel.app/api/server/request.html

@JesusP2
Copy link
Author

JesusP2 commented Apr 5, 2024

yeah you're right. It seems like getHeader is just an alias for getRequestHeader

@pilcrowOnPaper
Copy link
Member

From the docs, look like you can just pass event instead of nativeEvent

@JesusP2
Copy link
Author

JesusP2 commented Apr 5, 2024

I just tested it and at least for solidstart it must be nativeEvent otherwise you get a ts and runtime error.

Actually solidstart has asyncContext enabled by default so you don't even need to pass the event.

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

Successfully merging this pull request may close these issues.

None yet

2 participants