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

Access to res.locals in Sapper store #344

Closed
briancray opened this Issue Aug 6, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@briancray

briancray commented Aug 6, 2018

I noticed you have access to a req object in the server side Sapper middleware, but I'd love to see access to res.locals, which is where we traditionally store stuff to be rendered to the view. We have several middleware that add information to res.locals as the request travels through our response pipeline.

@Rich-Harris

This comment has been minimized.

Show comment
Hide comment
@Rich-Harris

Rich-Harris Aug 7, 2018

Member

Yeah, that sounds like a good idea, thanks. Would you be up for making a pull request? I think it'd just be a case of changing this line (and the associated TypeScript declarations) and augmenting/adapting this test.

Member

Rich-Harris commented Aug 7, 2018

Yeah, that sounds like a good idea, thanks. Would you be up for making a pull request? I think it'd just be a case of changing this line (and the associated TypeScript declarations) and augmenting/adapting this test.

Rich-Harris added a commit that referenced this issue Aug 8, 2018

Rich-Harris added a commit that referenced this issue Aug 10, 2018

@Rich-Harris Rich-Harris closed this in #350 Aug 10, 2018

@briancray

This comment has been minimized.

Show comment
Hide comment
@briancray

briancray Aug 10, 2018

This is great, thank you!

briancray commented Aug 10, 2018

This is great, thank you!

aubergene pushed a commit to aubergene/sapper that referenced this issue Sep 17, 2018

Merge pull request #350 from sveltejs/gh-344
pass response object to store getter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment