![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@teamteanpm2024/voluptatum-eum-doloribus
Advanced tools
Common Utils For React Component.
(...functions): Function
Create a function which will call all the functions with it's arguments from left to right.
import createChainedFunction from '@teamteanpm2024/voluptatum-eum-doloribus/lib/createChainedFunction';
(prop: string, instead: string, component: string): void
Log an error message to warn developers that prop
is deprecated.
import deprecated from '@teamteanpm2024/voluptatum-eum-doloribus/lib/deprecated';
(config: Object): Object
To generate a mixin which will render specific component into specific container automatically.
import getContainerRenderMixin from '@teamteanpm2024/voluptatum-eum-doloribus/lib/getContainerRenderMixin';
Fields in config
and their meanings.
Field | Type | Description | Default |
---|---|---|---|
autoMount | boolean | Whether to render component into container automatically | true |
autoDestroy | boolean | Whether to remove container automatically while the component is unmounted | true |
isVisible | (instance): boolean | A function to get current visibility of the component | - |
isForceRender | (instance): boolean | A function to determine whether to render popup even it's not visible | - |
getComponent | (instance, extra): ReactNode | A function to get the component which will be rendered into container | - |
getContainer | (instance): HTMLElement | A function to get the container |
Render children to the specific container;
import Portal from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Portal';
Props:
Prop | Type | Description | Default |
---|---|---|---|
children | ReactChildren | Content render to the container | - |
getContainer | (): HTMLElement | A function to get the container | - |
(fresh?: boolean): number
Get the width of scrollbar.
import getScrollBarSize from '@teamteanpm2024/voluptatum-eum-doloribus/lib/getScrollBarSize';
(): string
To generate a global unique id across current application.
import guid from '@teamteanpm2024/voluptatum-eum-doloribus/lib/guid';
(props: Object): Object
Pick valid HTML attributes and events from props.
import pickAttrs from '@teamteanpm2024/voluptatum-eum-doloribus/lib/pickAttrs';
(msg: string): void
A shallow wrapper of console.warn
.
import warn from '@teamteanpm2024/voluptatum-eum-doloribus/lib/warn';
(valid: boolean, msg: string): void
A shallow wrapper of warning, but only warning once for the same message.
import warning, { noteOnce } from '@teamteanpm2024/voluptatum-eum-doloribus/lib/warning';
warning(false, '[antd Component] test hello world');
// Low level note
noteOnce(false, '[antd Component] test hello world');
A collection of functions to operate React elements' children.
(children): children
Return a shallow copy of children.
import mapSelf from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Children/mapSelf';
(children: ReactNode[]): ReactNode[]
Convert children into an array.
import toArray from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Children/toArray';
A collection of functions to operate DOM elements.
(target: ReactNode, eventType: string, listener: Function): { remove: Function }
A shallow wrapper of add-dom-event-listener.
import addEventlistener from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Dom/addEventlistener';
(): boolean
Check if DOM is available.
import canUseDom from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Dom/canUseDom';
A collection of functions to operate DOM nodes' class name.
hasClass(node: HTMLElement, className: string): boolean
addClass(node: HTMLElement, className: string): void
removeClass(node: HTMLElement, className: string): void
import cssClass from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Dom/class;
(root: HTMLElement, node: HTMLElement): boolean
Check if node is equal to root or in the subtree of root.
import contains from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Dom/contains';
A collection of functions to get or set css styles.
get(node: HTMLElement, name?: string): any
set(node: HTMLElement, name?: string, value: any) | set(node, object)
getOuterWidth(el: HTMLElement): number
getOuterHeight(el: HTMLElement): number
getDocSize(): { width: number, height: number }
getClientSize(): { width: number, height: number }
getScroll(): { scrollLeft: number, scrollTop: number }
getOffset(node: HTMLElement): { left: number, top: number }
import css from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Dom/css';
A collection of functions to operate focus status of DOM node.
saveLastFocusNode(): void
clearLastFocusNode(): void
backLastFocusNode(): void
getFocusNodeList(node: HTMLElement): HTMLElement[]
get a list of focusable nodes from the subtree of node.limitTabRange(node: HTMLElement, e: Event): void
import focus from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Dom/focus';
{ animation: boolean | Object, transition: boolean | Object }
A flag to tell whether current environment supports animationend
or transitionend
.
import support from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Dom/support';
Enum
Enum of KeyCode, please check the definition of it.
import KeyCode from '@teamteanpm2024/voluptatum-eum-doloribus/lib/KeyCode';
(e: Event): boolean
Whether text and modified key is entered at the same time.
(keyCode: KeyCode): boolean
Whether character is entered.
ScrollLocker<{lock: (options: {container: HTMLElement}) => void, unLock: () => void}>
improve shake when page scroll bar hidden.
ScrollLocker
change body style, and add a class ant-scrolling-effect
when called, so if you page look abnormal, please check this;
import ScrollLocker from '@teamteanpm2024/voluptatum-eum-doloribus/lib/Dom/scrollLocker';
const scrollLocker = new ScrollLocker();
// lock
scrollLocker.lock()
// unLock
scrollLocker.unLock()
FAQs
Common Utils For React Component.
The npm package @teamteanpm2024/voluptatum-eum-doloribus receives a total of 0 weekly downloads. As such, @teamteanpm2024/voluptatum-eum-doloribus popularity was classified as not popular.
We found that @teamteanpm2024/voluptatum-eum-doloribus demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.