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

News Site Nuxt - Article Ids #448

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

flashdesignory
Copy link
Contributor

This is an alternate solution for: #427

The reason to keep creating unique ids, is that it'll allow us to potentially opt into a complexity param (#430), which could append content by cloning the sections in the data file. This is only possible, if we don't hard-code list ids in the data file (which was the previous solution).

Here, I am just creating the unique ids once, when the data gets assigned to the app, instead of the currently used version that had issues (#422).

Difference to the Next.js version:
You'll notice that the article-content already uses article.id in some instances in the main branch - this is not throwing any errors, but does assign undefined, since the article.id doesn't exist unless we create it somewhere (which is now done in the pr branch).

note: feel free to ignore the dist folder - that's just the generated build files

Crossbench - 10 iterations:

this pr

browser			Safari                    Firefox                Google Chrome
NewsSite-Nuxt  		61.10 ± 1.1%              67.35 ± 1.4%           60.95 ± 0.66%
NewsSite-Next  		58.98 ± 1.5%              78.5 ± 1.6%            75.4 ± 1.7%
Score          		16.72 ± 0.79%             13.80 ± 1.1%           14.78 ± 1.00%

main

browser			Safari                    Firefox                Google Chrome
NewsSite-Nuxt  		62.2 ± 2.6%               67.4 ± 1.7%            61.45 ± 1.2%
NewsSite-Next  		59.86 ± 1.4%              78.81 ± 1.2%           75.7 ± 2.1%
Score          		16.46 ± 1.8%              13.76 ± 1.0%           14.69 ± 1.5%

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.

1 participant