# Astro SSR pass data to slot
I'm new to astro and a little stuck on what seems to be a simple thing. I need to share fetched data in layout (kind of like protected route) to all page components.
I am using SSR with Node adapter and for the life of me can't figure out how to do it. I have tried nanostores / named slots hoping props can be passed like that.
RIght now the next options I am considering is cookies (doesn't feel right) and custom node-cache like described here
In react terms, this is what I would like do:
```
<ContextProvider / Store Setup Component> // Fetch some data and setup either store or context provider
<Route 1 /> // Has access to data and not having to re-fetch
<Route 2 /> // Has access to data and not having to re-fetch
....
</ContextProvider / Store Setup Component>
```
## Answer
What you're looking for is to put this data on the Astro.locals object using Middleware, the basic example actually spell out your desired use case.
You can check the request.url for the routes you want this data available in, do some async fetching in the middelware and access that data in any route or component.