daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. render() {
  2.   return <SortableItem {...extraProps} item={React.cloneElement(item, extraProps)} />
  3. }
  4.    
  5. render() {
  6.   return <props.item />
  7. }
  8.    
  9. Object {$$typeof: Symbol(react.element), key: "item-5", ref: null, props:
  10. Object, type: function…}
  11. $$typeof:Symbol(react.element)
  12. key:"item-5"
  13. props:Object
  14. ref:null
  15. type:function _class()
  16.    
  17. Fatal Exception:Uncaught Invariant Violation: Element type is invalid:
  18. expected a string (for built-in components) or a class/function (for
  19. composite components) but got: object. Check the render method of
  20. `SortableItem`.(reload cancelled)
  21.    
  22. render() {
  23.   return <SortableItem {...extraProps} item={<YourComponent />} />
  24. }
  25.    
  26. render() {
  27.   return {this.props.item}
  28. }
  29.    
  30. render() {
  31.   return <SortableItem {...extraProps} >
  32.      <YourComponent />
  33.   </SortableItem>
  34. }
  35.    
  36. render() {
  37.   return {this.props.children}
  38. }
  39.    
  40. return (
  41.   <div>
  42.     <SortableItem {...extraProps} item={React.cloneElement(item, extraProps)} />
  43.   </div>
  44. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top