All the course files for the Svelete (beginners) playlist on The Net Ninja YouTube channel.
Each lesson has it's own branch. To see the code for a particular lesson, select that branch from the branch dropdown (top-left).
All the course files for the Svelete (beginners) playlist on The Net Ninja YouTube channel.
Hi!
I'm coding along with the Youtube Svelte Beginners course (great course)
After adding the store file, I get this error on clicking on any of the answers of the Python or Javascript poll:
Uncaught ReferenceError: polls is not defined
handleVote @ bundle.js:2220
(anonymous) @ bundle.js:153
bubble @ bundle.js:153
vote_handler @ bundle.js:1738
(anonymous) @ bundle.js:142
(anonymous) @ bundle.js:141
handleVote @ bundle.js:1492
click_handler @ bundle.js:1501
The error presist even after I downloaded the lesson-29 branch of this repo and freshly installed it with npm install
and running npm run dev
.
What could be wrong?
At 8:18 in PollList.svelte
, passing the id in poll(id)
will throw a runtime error in Chrome and prevent the view to update in the Current Polls tab:
Uncaught (in promise) Error: Cannot have duplicate keys in a keyed each
at validate_each_keys (index.mjs:1218)
at create_fragment$4 (PollList.svelte:8)
at init (index.mjs:1489)
at new PollList (PollList.svelte:2)
at Array.create_if_block (App.svelte:50)
at Object.update [as p] (App.svelte:49)
at update (index.mjs:764)
at flush (index.mjs:732)
I believe it is related to this issue #4301.
To solve this, I just pass the poll without the id but it may cause problems in the following lessons.
{#each polls as poll}
<div>{poll.question}</div>
{/each}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.