4.1.0

Old

import { Plugin } from '@root'

Plugin.modal.open(...)
Plugin.modal.close()

Replacement

import { Plugin } from '@root'

Plugin.openModal(...)
Plugin.closeModal()

Documentation

useApplicationConfig

old

import { Plugin } from '@root'

const MyComponent = ({applicationId}) => {
    const applicationConfig = Plugin.useApplicationConfig(applicationId)
}

Replacement

import { Plugin } from '@root'

const MyComponent = () => {
    const { config } = Plugin.useApplication()
}

Documentation

applicationConfirm / add

Old

import { Plugin } from '@root'

const MyComponent = ({applicationId}) => {
    const handleApplicationConfirm = confirmPayload => {
        Plugin.applicationConfirm.add(applictionId, confirmPayload)
    }
}

Replacement

import { Plugin } from '@root'

const MyComponent = () => {
    const { confirm } = Plugin.useApplication()
    
    const handleApplicationConfirm = confirmPayload => {
        confirm.add(applictionId, confirmPayload)
    }
}

applicationConfirm / remove

Old

import { Plugin } from '@root'

const MyComponent = ({applicationId}) => {
    const handleRemoveApplicationConfirm = () => {
        Plugin.applicationConfirm.remove(applictionId)
    }
}

Replacement

import { Plugin } from '@root'

const MyComponent = () => {
    const { confirm } = Plugin.useApplication()
    
    const handleApplicationConfirm = confirmPayload => {
        confirm.remove()
    }
}

Documentation

Last updated