Skip to content

Can't access components that are memoized symbols in React 17 #420

Open
@catmando

Description

@catmando

they changed something

you can patch it like this:

# patch to detect new style React memoized symbols
module Hyperstack
  module Internal
    module Component
      class ReactWrapper
        def self.stateless?(ncc)
          `typeof #{ncc} === 'symbol' || typeof #{ncc}.$$typeof === 'symbol' || (typeof #{ncc} === 'function' && !(#{ncc}.prototype && #{ncc}.prototype.isReactComponent))`
        end
      end
    end
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompatibilitycompatibility with dependencies such as Rails, Opal, React, etc. NOT FUNCTIONAL COMPATIBILITYgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions