Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - Edit SAlert icon computation #586

Merged
merged 2 commits into from May 13, 2024

Conversation

VladislavPopovSR
Copy link

@VladislavPopovSR VladislavPopovSR commented May 7, 2024

Motivation:
Current SAlert implementation has warning because of the status icon computation.
Снимок экрана 2024-05-08 в 00 32 53

Now, we will use it's implementation instead of itself.
Instead of using eagerComputed

const StatusIcon = eagerComputed(() => STATUS_ICONS_MAP[props.status])

We will use native Vue watshSyncEffect

const StatusIcon = shallowRef<Component>()

watchSyncEffect(() => {
  StatusIcon.value = STATUS_ICONS_MAP[props.status]
})

Warning resolved✅
By the way, in Vue 3.4+ native computed was greatly improved and later we can replace every eagerComputed usage with it.

@VladislavPopovSR VladislavPopovSR merged commit 8e34e65 into next May 13, 2024
1 check passed
@VladislavPopovSR VladislavPopovSR deleted the fix/Edit-SAlert-icon-computation branch May 13, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants