Open
Description
🐛 Bug report
Since useId is not available on React17 it breaks with reach@0.17.0
In auto-id package https://github.com/reach/reach-ui/blob/develop/packages/auto-id/src/index.tsx,
import * as React from "react";
is compiled as
import { useId as useId$1, useState, useEffect } from 'react'
in the esm module.
This leads to the following error
Software | Name(s) | Version |
---|---|---|
Reach Package | reach/alert-dialog | 0.17.0 |
React | React | 17.0.2 |
React-scripts | react-scripts | 5.0.0 |
npm/yarn | yarn | 1.22.18 |
Operating System | MacOs | 12.3.1 |
Metadata
Metadata
Assignees
Labels
No labels
Activity
brandon-pereira commentedon Apr 29, 2022
We're experiencing the same issue!
mgo-af commentedon May 1, 2022
with:
RobertGemmaJr commentedon May 5, 2022
On the flip side:
It looks like
reach 0.17.0
still expects react 16 or 17 even though it relies on react 18 to work. I think thepackage.json
files for each individual component need to be updated. I'm running into issues with@reach/listbox
@reach/tabs
I gather there's more components with the same issue though
rbracco commentedon May 11, 2022
Any update on this? Has anyone found a fix? I'm completely unable to use Reach UI in React 17
gpbl commentedon May 15, 2022
Downgrade the package to 0.16 will restore the previous behavior.
chore(pkg): downgrade auto-id to 0.16
FrancescoBurchielli commentedon May 19, 2022
same issue here, it's quite a paradox - the library as a whole can't be used with react 18 yet, but certain sub-components work only with it and don't work anymore with react 17 - or am I missing something?
ghost commentedon Jun 20, 2022
make a fix or something that allow a user to use their own useId , or a guide how actually use your library. Reach! youre popular.
chore(pkg): downgrade auto-id to 0.16
auto-id
build for backwards compatibility with React <18 #961