storyblok-nuxt icon indicating copy to clipboard operation
storyblok-nuxt copied to clipboard

StoryblokComponent vs component

Open m0zz094 opened this issue 2 years ago • 12 comments

I get huge performance issues when using the StoryblokComponent instead of component:

example using component: https://family-business-unit-f0hhivfwp-cloudnova-srl.vercel.app/ image

example using StoryblokComponent: https://family-business-unit-6nuzynxzr-cloudnova-srl.vercel.app/ image

m0zz094 avatar May 28 '22 10:05 m0zz094

Hi @m0zz094 thanks for this issue! I'm curious about this, because StoryblokComponent is a basic wrapper of component as you can see https://github.com/storyblok/storyblok-vue/blob/main/lib/StoryblokComponent.vue

Have you investigated this further?

alexjoverm avatar May 30 '22 07:05 alexjoverm

@manuelschroederdev keeping you on the loop

alexjoverm avatar May 30 '22 07:05 alexjoverm

Hi @alexjoverm, I haven't investigated this further, but if you need more context here's what I'm doing on [...slug].vue

`

story = data.value.data.story; } `

m0zz094 avatar May 30 '22 13:05 m0zz094

Hey @m0zz094, could you possibly provide a link to your complete project on GitHub or StackBlitz? That would make it a little easier for us to debug the issue. Thanks. 😊

manuelschroederdev avatar Jun 01 '22 08:06 manuelschroederdev

I've create two different versions of a demo project, one using the StoryblokComponent, one using the default component. I've uploaded them to Vercel and couldn't identify any notable performance differences.

https://storyblok-components-test.vercel.app https://components-test-inky.vercel.app

Are you still encountering these issues?

manuelschroederdev avatar Jun 03 '22 10:06 manuelschroederdev

If you look at the page source on the the two links, there is a big difference, the https://storyblok-components-test.vercel.app/ does not generate the static markup and https://components-test-inky.vercel.app/ does.. Maybe there is a bug in StoryblokComponent?

Lauritzz77 avatar Jun 21 '22 18:06 Lauritzz77

I'm also experiencing the issue with the StoryblokComponent.

Here's a comparison of the markup generated for the two test sites @manuelschroederdev set up with Javascript disabled.

Notice that the component markup is only generated on https://components-test-inky.vercel.app/

storyblok-components components

caroillemann avatar Jun 22 '22 12:06 caroillemann

Thank you very much for pointing this out, @Lauritzz77 and @caroillemann. We will investigate this further and get back to you as soon as possible.

manuelschroederdev avatar Jun 23 '22 08:06 manuelschroederdev

Hi, @m0zz094 do you know if this is still an issue? @manuelschroederdev @Dawntraoz any update from our side?

alvarosabu avatar Apr 24 '23 11:04 alvarosabu

Hi @alvarosabu, I haven't changed my codebase since then honestly, I'm still using the component approach for now

m0zz094 avatar Apr 24 '23 11:04 m0zz094

As per the abovementioned issue, this behavior was fixed from v4.x.x -> https://github.com/storyblok/storyblok-nuxt/issues/204#issuecomment-1350794291.

Can you @m0zz094 replace your solution with StoryblokComponent using a v4.x or above of this package so we can be sure this issue can be closed <3 Thanks in advance!

Dawntraoz avatar Apr 24 '23 11:04 Dawntraoz

Any updates @m0zz094?

alvarosabu avatar May 09 '23 07:05 alvarosabu