LitElement tutorial part 2: Templating, properties, and events

  Рет қаралды 24,610

vaadinofficial

vaadinofficial

Күн бұрын

Пікірлер: 35
@GorillaDevFB
@GorillaDevFB 5 жыл бұрын
So helpful. My company is converting over from Polymer 2 to lit-html/ LitElement and these videos are helping me so much! Thanks man!
@marcushellberg13
@marcushellberg13 5 жыл бұрын
Awesome. I'm glad to hear that! They should still be mostly up to date, with the exception of `styles` for CSS instead of the tag in the template lit-element.polymer-project.org/guide/styles#where
@GorillaDevFB
@GorillaDevFB 5 жыл бұрын
@@marcushellberg13 great! Thanks for the tip.
@jofftiquez
@jofftiquez 4 жыл бұрын
Hello, great tutorial, what VS Code plugin are you using for lit-element html formatting?
@ΣτάθηςΣταθόπουλος-σ7ρ
@ΣτάθηςΣταθόπουλος-σ7ρ Жыл бұрын
lit-html by Matt Bierner
@8o8inSquares
@8o8inSquares 4 жыл бұрын
If someone wants to do it with pure html elements, for example using input type text instead of vaadin's input, instead of value, use .value and it should work
@dcts7526
@dcts7526 4 жыл бұрын
I didnt get how this would look like? Do you mind explaiing in more detail how you did it with the input element?
@ronanfegan799
@ronanfegan799 4 жыл бұрын
@@dcts7526 Something like this:
@Oswee
@Oswee 5 жыл бұрын
Really great series! Would like to see more.
@marcushellberg13
@marcushellberg13 5 жыл бұрын
Thanks! Do you have any specific topic you would like to see?
@Oswee
@Oswee 5 жыл бұрын
@@marcushellberg13 Hi. Sorry, but i think my lak of competency does not allow to give clear answer. I just got out of Golang and Event Sourcing (microsrvices) basics learning and started to move into front-end. I really like concept of web components and i trully want to build my future ERP kind product on top of custom elements. From my, as programming newbie, perspective i would like to see more modern design pattern stuff of creating mid-complex web software/app in context of custom elements. Like all this modern workflow - Webpack, babel, fetch, modules, classes etc. Kinda "development workflow/patterns of 2020" coz custom elements still gaining their traction and by showing modern design patterns (good practices) there is a option to bring in more new developers. I will continue tomorrow to watch last video and will try to build some new components and then probably i will have some more thoughts. I wrote several components already but it seems that i learned from outdated materials. In general... do not listen me. I am too new in programming to say something meaningfull. :) :) BTW - Vaadin elements looks really nicely designed. Like them much more than polymer/material desing. For desktop.
@marcushellberg13
@marcushellberg13 5 жыл бұрын
@@Oswee Thanks. Those sound like good ideas. I'll think of how to use them as base for new tutorials.
@Oswee
@Oswee 5 жыл бұрын
@@marcushellberg13 Ouh. In terms of components one of the first i want to build is websockets based data grid (table) with option to reorder rows by DnD. As feature will try to work on buffered scrolling. But for tutorial serries it probably will be too complex.
@marcushellberg13
@marcushellberg13 5 жыл бұрын
@@Oswee The Vaadin Grid allows you to do buffered scrolling with the dataProvider callback vaadin.com/components/vaadin-grid/html-examples/grid-data-demos. It allows you to reorder columns, but doesn't support reordering rows as of now. If that's something you would like to see, add a ticket on GitHub for the Grid so the dev team knows that there's a need for that.
@matteobadini6419
@matteobadini6419 5 жыл бұрын
Sorry if this sounds silly, but how did you get syntax highlighting inside template literal?. I use VS Code and it doesn’t work for me. Awesome series by the way!
@marcushellberg13
@marcushellberg13 5 жыл бұрын
There is a VS Code plugin for syntax highlighting and HTML support marketplace.visualstudio.com/items?itemName=bierner.lit-html Prettier also supports lit-html so you can get code formatting inside the template if you have it installed.
@matteobadini6419
@matteobadini6419 5 жыл бұрын
@@marcushellberg13 I've installed the lit-html extension but nothing changed. Am I missing something? Thank you in advance for your patience
@matteobadini6419
@matteobadini6419 5 жыл бұрын
Solved! It was a conflict with another extension.
@BrandonMcEachern19
@BrandonMcEachern19 5 жыл бұрын
@@matteobadini6419 Thanks, same here.
@justindb83
@justindb83 4 жыл бұрын
Do you take a hit on performance by not using the shadow dom?
@rahulkrishna631
@rahulkrishna631 2 жыл бұрын
Do you have information about how to write a test cases in open-wc/lit-element
@Aemulatius
@Aemulatius 5 жыл бұрын
Why did u add the change event on the input ? Is binding the value not enough via .value=this.task ?
@marcushellberg13
@marcushellberg13 5 жыл бұрын
lit-html doesn't have a concept of 2-way data binding. You can only set properties and will then need to listen to events and update things accordingly. This means that there's less magic, but also a bit more boilerplate. It's more or less the same as how things work in React, for instance. I'm not sure, but I would imagine that there are some form helpers for lit out there, to make data binding easier if you have more inputs
@Oswee
@Oswee 5 жыл бұрын
Text version is asking for password. Had a issues with WebPack almost on every step. :) But for now trans-piled down to just es2017 and was forced to use 'transform-object-rest-spread` babel plugin.
@marcushellberg13
@marcushellberg13 5 жыл бұрын
Sorry about that, I fixed the link. What specific issues have you had with webpack?
@HermannSchwarz
@HermannSchwarz Жыл бұрын
Typo in Object.valuEs. And the event listener in @value-changed doesn’t fire. I tried .value instead of value, but still doesn’t work.
@HermannSchwarz
@HermannSchwarz Жыл бұрын
Oh sorry, I forgot to import vaadin-radio-group. It works fine now.
@fairyanimal
@fairyanimal 5 жыл бұрын
$0 in the page is undefined for me. what can be wrong?
@marcushellberg13
@marcushellberg13 5 жыл бұрын
$0 in the dev tools refers to whatever element you have selected in the element window. Sounds like you don't have anything selected there.
@arithmetics
@arithmetics 4 жыл бұрын
thanks for posting these
@ArnavSingh-im5bj
@ArnavSingh-im5bj 4 жыл бұрын
you are awesome
@marcushellberg13
@marcushellberg13 4 жыл бұрын
Haha. Thanks!
LitElement tutorial part 3: State management with Redux
30:20
vaadinofficial
Рет қаралды 13 М.
Event communication between web components - Lit University (Advanced)
9:57
Lit: Simple. Fast. Web Components.
Рет қаралды 13 М.
Cool Parenting Gadget Against Mosquitos! 🦟👶 #gen
00:21
TheSoul Music Family
Рет қаралды 32 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 124 МЛН
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 11 МЛН
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 34 МЛН
Modern Lit tutorial
27:05
Jad Joubran
Рет қаралды 13 М.
Designing Modern UI with Lit Web Components
9:59
GitKraken
Рет қаралды 1,2 М.
Declarative Reactive Web Components with Justin Fagnani
49:59
Web Component Properties and Attributes
16:14
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 8 М.
How to build your first Lit component
11:59
Lit: Simple. Fast. Web Components.
Рет қаралды 37 М.
How to build a basic Web Component with Lit Element
11:34
Collin Kleest
Рет қаралды 6 М.
Lit 3.0 Explained
5:45
Awesome
Рет қаралды 65 М.
LitElement app tutorial part 1: Getting started
6:01
vaadinofficial
Рет қаралды 42 М.
Cool Parenting Gadget Against Mosquitos! 🦟👶 #gen
00:21
TheSoul Music Family
Рет қаралды 32 МЛН