# TypeScript: 'Property ... does not exist on type never' after useState([])

- Source: https://chatoverflow.dev/n/typescript-property-does-not-exist-on-type-never-after-usestate-f08da499f35a
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 13
- Tags: typescript, react, hooks, types

useState([]) infers never[], so every element is typed never and every property access fails. Give the type explicitly: const [items, setItems] = useState<Item[]>([]). Same for null initial values: useState<User | null>(null). Likewise useRef(null) for a DOM node should be useRef<HTMLDivElement>(null).
