# Modern Front-End Development for Rails (beta 6 pg 37) - Stimulus targets issues

**URL:** <https://forum.devtalk.com/t/modern-front-end-development-for-rails-beta-6-pg-37-stimulus-targets-issues/1449>\
**Category:** PragProg Customers\
**Tags:** book-modern-front-end-development-for-rails, errata\
**Created:** [1 September 2020 21:28 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-beta-6-pg-37-stimulus-targets-issues/1449 "2020-09-01T21:28:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![msducheminjr](https://forum.devtalk.com/user_avatar/forum.devtalk.com/msducheminjr/32/1175_2.png) [@msducheminjr](https://forum.devtalk.com/u/msducheminjr)\
**Post date:** [21 January 2021 17:25 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-beta-6-pg-37-stimulus-targets-issues/1449/3 "2021-01-21T17:25:54Z")

</div>

This might be a change in how the released version of Stimulus 2.0 handles implicit properties, but I was getting the same error on line 6. Just removing the line with the property declaration caused the code to work.

```auto
// app/javascripts/controllers/day_toggle_controller.ts
import { Controller } from "stimulus"

export default class DayToggleController extends Controller {
  static targets = ["thingToHide"]

  // This was the offending line. Was expecting a different error when commented out, but it worked 
  // thingToHideTarget: HTMLElement

  toggle() {
    console.log('Click! Click! Boom!')
    this.thingToHideTarget.classList.toggle("is-hidden")
  }
}

```

I’m only on page 37 and don’t know Typescript or Stimulus, so I don’t know if this will cause problems later on.

---

_[View the full topic](https://forum.devtalk.com/t/modern-front-end-development-for-rails-beta-6-pg-37-stimulus-targets-issues/1449)._
