David Colby
Dec 6, 2020

--

Hi Juanse - This tutorial will work as-is with Stimulus 2; however, you'll see some warnings in your web console about deprecations related to the way that the data-targets are set.

In Stimulus 2, you'll want to set the target with something like:

<div data-comments-target="commentList" class="mb-4">

Instead of:

<div data-target="comments.commentList" class="mb-4">

The companion repo for this tutorial has been updated to use the new syntax and also implements the new CSS Classes and Values APIs:

https://github.com/DavidColby/stimulus_comments_demo

--

--

David Colby
David Colby

Written by David Colby

Product and engineering leader turned solo founder and consultant. I care about helping others grow and building cool things.

No responses yet