What's Changed
- feat!: React 19 by @CodyJasonBennett in #19
This release adds support for React 19, and removes its own act
export in favor of React.act
.
Any augmentations or references to global JSX are now to be included in the react
module. You can check out the React 19 changelog here.
import { useState, useEffect, act } from 'react'
import { render } from 'react-nil'
declare module 'react' {
namespace JSX {
interface IntrinsicElements {
timestamp: Record<string, unknown>
}
}
}
function Test() {
const [value, setValue] = useState(-1)
useEffect(() => setValue(Date.now()), [])
return <timestamp value={value} />
}
const container = await act(async () => render(<Test />))
// { type: 'timestamp', props: { value: number }, children: [] }
console.log(container.head)
Full Changelog: v1.3.1...v2.0.0