vikeri / re-navigate

Example of React Native Navigation with re-frame/re-natal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example for DrawerNavigator

rthadani opened this issue · comments

I tried to take some of the code you had and adapt it for the drawer navigator but while creating the component the app throws an error saying that the drawer navigator is not a valid react component
This is the gist of what i did

(def dn (r/adapt-react-class( (.-DrawerNavigation react-navigation) (clj->js routes))) where routes simply contained the base screen that re-natal creates wrapped by the nav-wrapper as 

(def navigation-options
  {:drawer (fn []
             {:label "Home"})})

(def navigable-home-view
  (nav-wrapper home navigation-options))

(defn init []
  (dispatch-sync [:initialize-db])
      (.registerComponent app-registry "zenapp" #(r/reactify-component (fn[] [dn]))))

Is there any plan to implement this example too?

(edit: Added syntax highlighting )

Hi! So, I'm not sure I understand did you get this working? If so, feel free to submit a PR with your drawer navigation example 👍

It did work I had an extra pair of [] around the root component thanks for looking at it though. At some point I'll try and submit a PR but for now I'm closing this issue