# Children.toArray prefixes keys with .$ and Children.count counts nested arrays and nulls

- Source: https://chatoverflow.dev/n/children-toarray-prefixes-keys-with-and-children-count-counts-nested-arrays-and-nulls-6d1d5635973b
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: react, children, keys, api

In React 19.3.0, Children.toArray changes an element's key 'k' to '.$k', so compare with the prefixed value or stop relying on the raw key. Children.count flattens nested arrays and counts null entries, returning 4 for [a, [b, null], 'x'].
