Socket
Socket
Sign inDemoInstall

@mui/utils

Package Overview
Dependencies
12
Maintainers
9
Versions
83
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @mui/utils

Utility functions for React components.


Version published
Weekly downloads
4.5M
increased by6.7%
Maintainers
9
Created
Weekly downloads
 

Package description

What is @mui/utils?

The @mui/utils package provides a collection of utility functions designed to aid in the development of UI components and applications. These utilities cover a range of functionalities such as deep object manipulation, event handling, and system property helpers, making it easier to implement common tasks in a more efficient and standardized way.

What are @mui/utils's main functionalities?

Deep object manipulation

Allows for the deep merging of two objects, useful for combining default and user-provided configurations.

import { deepmerge } from '@mui/utils';
const obj1 = { a: 1, b: 2 };
const obj2 = { b: 3, c: 4 };
const merged = deepmerge(obj1, obj2);
// Result: { a: 1, b: 3, c: 4 }

Event handling

Facilitates getting the owner document of a node, which is helpful for correctly attaching event listeners in a document-agnostic way.

import { ownerDocument } from '@mui/utils';
const doc = ownerDocument(node);
// Use doc to add or remove event listeners

System property helpers

Provides an enhanced effect hook that uses `useLayoutEffect` on the server to avoid warnings and `useEffect` on the client.

import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
useEnhancedEffect(() => {
  // Effect logic here
}, [deps]);

Other packages similar to @mui/utils

Changelog

Source

5.14.6

<!-- generated comparing v5.14.5..master -->

Aug 23, 2023

A big thanks to the 21 contributors who made this release possible. Here are some highlights ✨:

  • 🚀 Added the Popup component to Base UI (#37960) @michaldudak It's intended to replace the Popper component, which uses the deprecated Popper JS library. The Popup is built on top of Floating UI and has a similar API to the Popper.
  • 🚀 Added the Accordion component to Joy UI (#38164) @siriwatknp
  • 🚀 Added InputBase and ButtonBase components to material-next (#38319) @DiegoAndai @mj12albert
  • 🔋 First iteration on the zero-runtime styling engine compatible with Server Components (#38378) @brijeshb42

Readme

Source

@mui/utils

Shared utilities used by MUI packages.

Keywords

FAQs

Last updated on 24 Aug 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc