Skip to content

React 0.13 warning about mutated props #35

Description

@neverfox

I could just be doing something wrong but Rum seems to be running afoul of the change in React 0.13 to immutable props. See here and here.

(defonce app-state (atom {:text "Hello World!"}))

(rum/defc app < rum/cursored rum/cursored-watch [app-state]
          [:h1 (:text @app-state)])

(defn main []
  (rum/mount
    (app app-state)
    (. js/document (getElementById "app"))))
Warning: Don't set .props.:rum/state of the React component <app />. Instead, specify the correct value when initially creating the element or use React.cloneElement to make a new element with updated props.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions