Fork me on GitHub
#fulcro
<
2019-05-16
>
fatihict09:05:23

I am using the latest version of Chrome and I've been seeing errors such as arr_append is not a function and strip_prefix is not a function in my console with a blank page in my tab where my Fulcro app runs or Chrome dev tools disconnecting which is only recoverable by a page refresh. A couple of my colleagues have also been stumbling on these issues, does anyone know what the cause of these issues are?

currentoor16:05:38

are you talking about the Fulcro Inspect plugin?

currentoor16:05:13

if yes, sometimes it gets corrupted by chrome, uninstalling and re-installing it fixes it usually

fatihict22:05:42

I'm not sure if it's an issue with Fulcro inspect. I can try to uninstall and reinstall to see if that fixes it

fatihict08:05:25

I have reinstalled Fulcro inspect without luck. I will try to pinpoint the issue I'm running into.

phreed23:05:21

I am trying to use the https://github.com/plotly/react-cytoscapejs component.

(ns flechar.ui.cyto
  (:require
    [fulcro.client.dom :as dom]
    [fulcro.client.primitives :as prim]
    [flechar.ui.helper :as help]
    ["react-cytoscapejs" :as cy]))

(def elements
  #js[ { :data #js { :id "one", :label "Node 1" }, :position #js { :x 0, :y 0 } },
       { :data #js { :id "two", :label "Node 2" }, :position #js { :x 100, :y 0 } },
       { :data #js { :source "one", :target "two", :label "Edge from Node1 to Node2"}}])

(def cytoscape-component (help/factory-apply cy/CytoscapeComponent))

(prim/defsc Cyto
  [_ props]
  (cytoscape-component #js {:elements elements
                            :style #js { :width "600px" :height "600px"}}))

(def ui-cyto (prim/factory Cyto {:keyfn :cyto/id}))
I get ... "Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports." I suspect it is because the export default class CytoscapeComponent ... I saw some discussion on making it possible to handle export default components. https://dev.clojure.org/jira/browse/CLJS-2376 However, I was not able to discover if it is available in Fulcro. Although this gist seems to indicate it is