The Stack Snippet React version is outdated to such an extent that using a CDN link has become mandatory.
Stack Snippets provide React
16.6.3 as highest version.
16.6is a very old minor,
16.14.0has been around since October 14, 2020
17has been released more than a year ago (October 20, 2020)
18has been released previous month (March 29, 2022)
As suggested in this 2 year old meta question about improving React support:
Can the React version be bumped to include at least a Hooks supported version? (Minimal