Re: [w3ctag/design-reviews] Cookie Store API (#469)

```js
const cookieData = cookieStore.get(cookieName); cookieStore.set(cookieData);
```
should be 
 
```js
const cookieData = await cookieStore.get(cookieName); cookieStore.set(cookieData);
```

given the idea is that this is async :)

For me it seems like a bit of magic. The getter returns more than just the { name, value } pair and it is not really a performance optimization due to being a common operation as it is already async, so I am not a bit fan of the magic and you can just do

```js
const { name, value } = await cookieStore.get(cookieName); cookieStore.set(name, value);
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/469#issuecomment-594979013

Received on Thursday, 5 March 2020 01:25:58 UTC