buttermilk
buttermilk copied to clipboard
Child of Link component can't be React element anymore in v2.0.0
The following code worked in [email protected]
but does not work in [email protected]
anymore:
import { Link } from 'buttermilk';
// ...
<Link href="/">
<span>Home</span>
</Link>
Now no error is thrown, but it just doesn't link. Nothing happens when it actually should route to /
.
When debugging I found that the <Link />
component only works if it's child is a string, e.g. <Link href="/">Home</Link>
.
I saw you didn't change cjs.js
in your v2.0.0. update, but something must have changed which influences this..
Hmm. Can you make a codesandbox reproduction for this? Sorry for the late response.
I reproduced this same issue in 2.0.1 here: https://codesandbox.io/s/modest-robinson-tm1iy
You can also try changing buttermilk back to 1.1.2 in codesandbox, which fixes the issue. In the codesandbox browser view it looks like it's pushing the actual route to history but not rendering anything new. Hope you can get this fixed.