Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: support isElement function #4041

Merged
merged 5 commits into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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