@rbxts/pretty-react-hooks
Version:
Useful hooks for @rbxts/react
24 lines (15 loc) • 388 B
Markdown
```tsx
function useCamera(): Camera;
```
Returns the value of `Workspace.CurrentCamera`. If the current camera changes, it will trigger a re-render.
- A camera instance.
```tsx
function CameraPortal() {
const camera = useCamera();
return createPortal(<textlabel Text="Hello, World!" />, camera);
}
```