        :component-did-update reset-trigger-point!
 
        :reagent-render
-       (fn [child-el opts]
+       (fn [opts child-el]
          (reset! options opts)
          child-el)}))))
 

       :component-will-mount
       (fn []
         (swap! waypoints assoc id {:options options}))
       :component-will-unmount
       (fn []
         (swap! waypoints dissoc id))

(defn- get-offset-position [node offset]
  (cond
    (number? offset)  offset
    (string? offset)  (as-percentage (.-clientHeight node) offset)
    (fn? offset)      (offset node)
    :else             0))

