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

          (when (or crossed-forward crossed-backward)
            (let [direction (if crossed-forward :forward :backward)]
              (.log js/console "Passed" id "going" direction)
              (when callback (callback direction)))))))))

(defn waypoint-context [_]
  (let [state (atom {})


(defn check-waypoints [last-scroll-y]
  (let [new-scroll-y (page-offset)]
    (doseq [[id {:keys [options trigger-point]}] @waypoints]
      (when trigger-point
        (let [was-before-trigger (< last-scroll-y trigger-point)
              now-after-trigger (>= new-scroll-y trigger-point)
