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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async component <Highlight> should be explicitly created via defineAsyncComponent() in Vue 3 #6121

Open
1 task done
josefarrugia opened this issue Apr 8, 2024 · 7 comments
Labels
triage Issues to be categorized by the team

Comments

@josefarrugia
Copy link

馃悰 Current behavior

Hello there,

I am getting the following Vue warning error message when using the AisHighlight component in Vue 3.4.21 whilst entering characters in my search field. There are no results being shown too. This works on Vue 2.7.16.

[Vue warn]: (deprecation COMPONENT_ASYNC) Async component <Highlight> should be explicitly created via `defineAsyncComponent()` in Vue 3. Plain functions will be treated as functional components in non-compat build. If you have already migrated all async component usage and intend to use plain functions for functional components, you can disable the compat behavior and suppress this warning with:

configureCompat({ COMPONENT_ASYNC: false })

Details: https://v3-migration.vuejs.org/breaking-changes/async-components.html 

Here's a snippet of my import statements:

import {
  AisAutocomplete,
  AisConfigure,
  AisHighlight,
  AisInstantSearch,
} from 'vue-instantsearch/vue3/es';

I am also getting the following warning message:

Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core . 
  at <AisAutocomplete> 
  at <AisInstantSearch

Any thoughts?

馃攳 Steps to reproduce

  1. Create Vue 3.4.21 app
  2. Install npm install algoliasearch vue-instantsearch
  3. Setup algolia
  4. Import the following components AisAutocomplete, AisConfigure, AisHighlight, AisInstantSearch, to your Vue template
  5. Initiate a search
  6. Take note of the Vue warning message in the console: Vue warn]: (deprecation COMPONENT_ASYNC) Async component <Highlight> should be explicitly created via defineAsyncComponent() in Vue 3

Live reproduction

no link at the moment

馃挱 Expected behavior

Hits should be displayed whilst typing in a few characters.

Package version

vue-instantsearch@4.15.0, algoliasearch@4.4.0

Operating system

No response

Browser

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@josefarrugia josefarrugia added the triage Issues to be categorized by the team label Apr 8, 2024
@Haroenv
Copy link
Contributor

Haroenv commented Apr 15, 2024

Hm, this may be a breaking change in Vue. I know it definitely works in older vue versions, like 3.2.4 here https://github.com/algolia/doc-code-samples/blob/master/vue-instantsearch/vue3-vite/yarn.lock#L642 (or 3.2.47 elsewhere). From which vue version are you able to reproduce this?

@josefarrugia
Copy link
Author

@Haroenv Vue@3.4.21

@Haroenv
Copy link
Contributor

Haroenv commented Apr 15, 2024

Yes, I read the original text, but with older vue versions it definitely works. Does 3.4.0 for example have that error already?

@josefarrugia
Copy link
Author

@Haroenv apologies I misread your original message. So I have dropped down the following packages, vue@3.2.26, @vue/compat@3.2.26 and @vue/compiler-sfc@3.2.26, and it's still producing the same warning message:

[Vue warn]: (deprecation RENDER_FUNCTION) Vue 3's render function API has changed. You can opt-in to the new API with:

configureCompat({ RENDER_FUNCTION: false })

@Rigo-m
Copy link

Rigo-m commented Apr 17, 2024

@josefarrugia happy to look into it, but require a minimal reproduction. Can you provide it?

@josefarrugia
Copy link
Author

josefarrugia commented Apr 17, 2024

@Rigo-m sure, what particular files would you like to see and how do I go about sharing it with you?

@Rigo-m
Copy link

Rigo-m commented Apr 17, 2024

Can you provide a public repository with a minimal setup that reproduces the behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issues to be categorized by the team
Projects
None yet
Development

No branches or pull requests

3 participants