Socket
Socket
Sign inDemoInstall

@mui/utils

Package Overview
Dependencies
11
Maintainers
10
Versions
79
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
Maintainers
10
Created

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

v6.0.0-alpha.3

<!-- generated comparing v6.0.0-alpha.2..next -->

Apr 17, 2024

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

  • 🔥 Converted 5 more Material UI components to use Pigment CSS.
  • 🚀 Added container queries utility to the @mui/system package (#41674) @siriwatknp.

Readme

Source

@mui/utils

Shared utilities used by MUI packages.

Keywords

FAQs

Last updated on 17 Apr 2024

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