# get

Get a property value from the current state of a RefStruct.

## Signatures

```ts
export declare const get: {
    <S extends object, const K extends keyof S>(key: K): <E, R>(ref: RefStruct<S, E, R>) => RefSubject.Computed<S[K], E, R>;
    <S extends object, const K extends keyof S, E, R>(ref: RefStruct<S, E, R>, key: K): RefSubject.Computed<S[K], E, R>;
};
```

## Why

Projects a known property as Computed state, so current reads and future pushes stay linked to
the struct without copying that field into a second store.

## Ownership and lifetime

The get view retains no independent state. An Effect read samples the source once; Fx
observation follows later pushes and its observing Scope owns subscription cleanup.

## Examples

```ts
import { Effect } from "effect"
import * as RefStruct from "@typed/fx/RefStruct"

const program = Effect.scoped(Effect.gen(function* () {
  const account = yield* RefStruct.make({ name: "Ada", active: true })
  const name = RefStruct.get(account, "name")
  return yield* name
}))
```
