There are three ways to reach a message API, and they are not interchangeable.
- The static message.success(...) imported from antd renders outside your React tree, so your theme, direction and locale never reach it. It shows up in stock Ant Design colors.
- App.useApp().message is the instance built by the <App> that AntuikitProvider renders, so it follows your theme.
- useMessage() returns that same instance with your icon pack's glyphs. It returns the instance itself, not an [api, contextHolder] pair, so there is no holder to render. It throws outside AntuikitProvider.
Keep the static for code outside React, like a request interceptor, and accept that it is not themed. Inside a component, use the hook. Two instances on one page also mean two stacks and two sets of keys, so destroy() on one leaves the other's messages open.