From f3e1c035419d5025d0b6cf35b44443479469b811 Mon Sep 17 00:00:00 2001 From: Ben Koshy Date: Tue, 30 Aug 2022 16:20:18 +1000 Subject: [PATCH] Add clarifying example for camelCase targets (#577) --- docs/reference/targets.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/reference/targets.md b/docs/reference/targets.md index 93151000..b2fe5bed 100644 --- a/docs/reference/targets.md +++ b/docs/reference/targets.md @@ -121,4 +121,15 @@ with a matching name, the corresponding callback _will not_ be invoked again. ## Naming Conventions -Always use camelCase to specify target names, since they map directly to properties on your controller. +Always use camelCase to specify target names, since they map directly to properties on your controller: + +```html + + +``` + +```js +export default class extends Controller { + static targets = [ "camelCase" ] +} +```