You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initializing twMerge() is the most expensive operation, so we want to be smart about it. There are currently two scenarios in which this computation isn't necessary:
When someone uses createTailwindMerge() to create a custom merge function, it doesn't make sense to initialize twMerge() because it probably won't be even imported from the package. Maybe tree shaking removes the logic already, but I should check whether that's the case.
If an app doesn't call twMerge() during the initial render, we're slowing down app startup time for no reason. In that case it would be nice to delay initialization until the function is needed.
The text was updated successfully, but these errors were encountered:
Initializing
twMerge()
is the most expensive operation, so we want to be smart about it. There are currently two scenarios in which this computation isn't necessary:When someone uses
createTailwindMerge()
to create a custom merge function, it doesn't make sense to initializetwMerge()
because it probably won't be even imported from the package. Maybe tree shaking removes the logic already, but I should check whether that's the case.If an app doesn't call
twMerge()
during the initial render, we're slowing down app startup time for no reason. In that case it would be nice to delay initialization until the function is needed.The text was updated successfully, but these errors were encountered: