day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
634 stars 68 forks source link

Release latest artifact for React 16.9 support #250

Closed dijonkitchen closed 4 years ago

dijonkitchen commented 5 years ago

The Readme notes that you can use the "0.5.3-rc1" artifact, but it's not released on Clojars.

Without it, it seems re-frame-10x has a bunch of deprecation warnings:

Warning: componentWillMount has been renamed, and is not recommended for use. 
See https://fb.me/react-async-component-lifecycle-hooks for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in 
non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated 
lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in 
your project source folder.

Please update the following components: day8.re_frame_10x.devtools_outer, 
day8.re_frame_10x.utils.re_com.box, day8.re_frame_10x.utils.re_com.button, 
day8.re_frame_10x.utils.re_com.gap_f, day8.re_frame_10x.utils.re_com.h_box, 
day8.re_frame_10x.utils.re_com.label, day8.re_frame_10x.utils.re_com.line, 
day8.re_frame_10x.utils.re_com.v_box, day8.re_frame_10x.view.app_db.no_pods, 
day8.re_frame_10x.view.app_db.panel_header, day8.re_frame_10x.view.app_db.pod_section, 
day8.re_frame_10x.view.app_db.render, day8.re_frame_10x.view.container.devtools_inner, 
day8.re_frame_10x.view.container.event_name, 
day8.re_frame_10x.view.container.right_hand_buttons, 
day8.re_frame_10x.view.container.tab_button, devtools outer
superstructor commented 5 years ago

Apologies for the inaccuracy of the README @dijonkitchen

There is currently an issue with inlining dependencies with mranderson for reagent 0.9.0-rc1 and re-frame 0.11.0-rc1.

I have reverted the offending commits causing the confusion from master and moved ongoing work on that to develop until it is actually released.

ivarref commented 4 years ago

Any work / progress on this? reagent 0.9.1 is out, as is re-frame 0.11.0.

From what I can tell the issue originates in ztellman/riddley#31.

Thanks and kind regards.

dijonkitchen commented 4 years ago

Using:

                 [reagent "0.9.1"]
                 [re-frame "0.11.0"]
                 [cljsjs/react "16.12.0-2"]
                 [cljsjs/react-dom "16.12.0-2"]
                 [day8.re-frame/http-fx "0.1.6"]

I still get these warnings:

[Warning] Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. (react-dom.inc.js, line 12503)

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: day8.re_frame_10x.devtools_outer, day8.re_frame_10x.svgs.down_arrow, day8.re_frame_10x.svgs.left, day8.re_frame_10x.svgs.open_external, day8.re_frame_10x.svgs.right, day8.re_frame_10x.svgs.round_arrow, day8.re_frame_10x.svgs.settings, day8.re_frame_10x.svgs.skip_to_end, day8.re_frame_10x.svgs.triangle_down, day8.re_frame_10x.utils.re_com.box, day8.re_frame_10x.utils.re_com.button, day8.re_frame_10x.utils.re_com.gap_f, day8.re_frame_10x.utils.re_com.h_box, day8.re_frame_10x.utils.re_com.label, day8.re_frame_10x.utils.re_com.line, day8.re_frame_10x.utils.re_com.v_box, day8.re_frame_10x.view.app_db.no_pods, day8.re_frame_10x.view.app_db.panel_header, day8.re_frame_10x.view.app_db.pod_section, day8.re_frame_10x.view.app_db.render, day8.re_frame_10x.view.container.devtools_inner, day8.re_frame_10x.view.container.event_name, day8.re_frame_10x.view.container.right_hand_buttons, day8.re_frame_10x.view.container.tab_button, devtools outer

[Warning] Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. (react-dom.inc.js, line 12503)

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: day8.re_frame_10x.utils.re_com.hyperlink_href, day8.re_frame_10x.utils.re_com.p, day8.re_frame_10x.view.event.event_code, day8.re_frame_10x.view.event.no_event_instructions, day8.re_frame_10x.view.event.render

[Warning] Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. (react-dom.inc.js, line 12503)

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: day8.re_frame_10x.svgs.reload, day8.re_frame_10x.utils.re_com.hyperlink_info

[Warning] Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. (react-dom.inc.js, line 12503)

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: day8.re_frame_10x.utils.re_com.hyperlink, day8.re_frame_10x.view.event.code_header, day8.re_frame_10x.view.event.event_expression, day8.re_frame_10x.view.event.event_fragments, day8.re_frame_10x.view.event.indent_block, day8.re_frame_10x.view.event.repl_msg_area, day8.re_frame_10x.view.event.repl_section, event-expression
[Warning] Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. (react-dom.inc.js, line 12503)

* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: event-expression
qezz commented 4 years ago

Setting the following dependencies fixed this issue that I have been trying to figure out for 2 days lol

                 [reagent                    "0.8.1"]
                 [re-frame                   "0.10.8"]
                 [day8.re-frame/re-frame-10x "0.4.2"]

To be precise, I made these changes:

                  [thheller/shadow-cljs       "2.8.83"]
-                 [reagent                    "0.9.1"]
-                 [re-frame                   "0.10.6"]
+                 [reagent                    "0.8.1"]
+                 [re-frame                   "0.10.8"]
                  [binaryage/devtools         "0.9.10"]
                  [clj-commons/secretary      "1.2.4"]
                  [day8.re-frame/tracing      "0.5.3"]
                  [day8.re-frame/http-fx "0.1.6"]
-                 [day8.re-frame/re-frame-10x "0.4.0"]
+                 [day8.re-frame/re-frame-10x "0.4.2"]
                  [day8.re-frame/tracing "0.5.1"]]

P.S. I build it with lein shadow watch client, but i cannot get it work on conduit example with yarn dev || npm run dev way. Probably, these dependencies are not released in yarn/npm, yet.

dijonkitchen commented 4 years ago

These are just deprecation warnings for the new versions of React, so it makes sense that if you don't want to see them, dropping down on the versions will remove them.

qezz commented 4 years ago

Yes, you are right! Though I've been developing my own app and got re-frame-10x (i think it's because of tracing) errors all the time like this:

react.development.js:189 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of `day8.re_frame_10x.utils.re_com.box`.
    in day8.re_frame_10x.utils.re_com.box (created by event-expression)
    in event-expression (created by day8.re_frame_10x.view.event.event_expression)
   ...

I checked it with the conduit example and got the same error. So I managed to google two issues about it (this one and https://github.com/thheller/shadow-cljs/issues/526), and then decided to post my solution here with hope that it would help someone!

superstructor commented 4 years ago

0.5.1 is released which should address these issues albeit has some unrelated aesthetic regressions (non-breaking) that will be fixed in a subsequent minor release.

0.5.1 includes re-frame 0.11.0, reagent 0.9.1 and react 16.9.0.