Skip to content

Commit

Permalink
feature: support isElement function (#4041)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbbfcd authored Aug 4, 2023
1 parent d8f2fb3 commit 485320f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compat/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ export function useTransition() {
// styles/... before it attaches
export const useInsertionEffect = useLayoutEffect;

// compat to react-is
export const isElement = isValidElement;

/**
* This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84
* on a high level this cuts out the warnings, ... and attempts a smaller implementation
Expand Down Expand Up @@ -241,6 +244,7 @@ export default {
createRef,
Fragment,
isValidElement,
isElement,
isFragment,
findDOMNode,
Component,
Expand Down

0 comments on commit 485320f

Please sign in to comment.