defineExtensions
The defineExtensions
function is used only once in your extensions project. Its purpose is to connect your components to the available extension points in Sales App.
Usage
import { defineExtensions } from '@vtex/sales-app';import { Recommendations } from './Recommendations';
export default defineExtensions({ 'cart.cart-list.after': Recommendations});
Parameters
The defineExtensions
function accepts a single parameter, which is a Record<ExtensionPoints, () => ReactNode>
. The ExtensionPoints
type represents a list of valid extension points where you can attach your custom extensions. For more details, refer to the ExtensionPoints page.