$$ is not defined


I’m attempting to add a select list and i’m using the first “Select List” example from the style guide like this:

class FileListView extends SelectListView
      initialize: (@listOfItems) ->
        @addClass('overlay from-top')
      attach: ->
      # Here you specify the view for an item
      viewForItem: (item) ->
        $$ ->
          @li =>
            @raw item
      confirmed: (item) ->
    view = new FileListView(['one','two','three'])

and I’m getting this error in the console:

Uncaught ReferenceError: $$ is not defined 

I checked the docs for atom/space-pen and noticed that $$ is supposed to be some sort of global variable or something. What exactly is the $$ variable and what is going wrong when I’m attempting to use this example?

Thanks for your help!


You need to require it first with {$$} = require 'atom' to be able to use it