mirror of
https://github.com/kennethnym/jrx.git
synced 2026-03-20 20:01:19 +00:00
Support null and undefined in JrxNode type
Split JrxNode into JrxElement (concrete branded object) and JrxNode (JrxElement | null | undefined), mirroring React's ReactElement vs ReactNode pattern. Components can now return null/undefined to render nothing. - Rename isJrxNode to isJrxElement (deprecated alias kept) - Handle null-returning components in jsx/jsxs factories - Add tests for null/undefined returns, children filtering, render() rejection Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
export { render } from "./render";
|
||||
export { isJrxNode, JRX_NODE, FRAGMENT } from "./types";
|
||||
export type { JrxNode, JrxComponent, RenderOptions } from "./types";
|
||||
export { isJrxElement, isJrxNode, JRX_NODE, FRAGMENT } from "./types";
|
||||
export type { JrxElement, JrxNode, JrxComponent, RenderOptions } from "./types";
|
||||
|
||||
Reference in New Issue
Block a user