hyper-react icon indicating copy to clipboard operation
hyper-react copied to clipboard

API Wrapping Coverage

Open catmando opened this issue 9 years ago • 1 comments

From @zetachang on February 18, 2015 16:41

React

  • [x] React.createClass - not valid, React.create_element automatically cache the component class
  • [x] React.createElement
  • [ ] React.createFactory
  • [x] React.render
  • [x] React.unmountComponentAtNode
  • [x] React.renderToString
  • [x] React.renderToStaticMarkup
  • [x] React.isValidElement
  • [x] React.DOM - use DOM builder DSL instead
  • [x] React.PropTypes - refer to #4
  • [ ] React.initializeTouchEvents

React.Children (simply make children include Enumerable)

  • [x] React.Children.map - map
  • [x] React.Children.forEach - each
  • [x] React.Children.count - length, size
  • [ ] React.Children.only - only (throw what??)

ReactComponent

  • [x] setState - set_state(next_state)
  • [x] replaceState set_state!(next_state)
  • [x] forceUpdate force_update!
  • [x] getDOMNode dom_node (maybe return opal-browser's Node)
  • [x] isMounted
  • [x] setProps set_props
  • [x] replaceProps set_props!(next_props)

Component Spec

  • [x] render
  • [x] getInitialState - provided from define_state yielded result
  • [x] getDefaultProps - refer to #4
  • [x] propTypes - refer to #4
  • [x] mixins
  • [x] statics: use ruby class method
  • [ ] displayName

Component Lifecycle

  • [x] componentWillMount - before_mount helpers
  • [x] componentDidMount - after_mount helpers
  • [x] componentWillReceiveProps - before_receive_props(next_props)
  • [x] shouldComponentUpdate - needs_update?(next_props, next_state)
  • [x] componentWillUpdate - before_update(next_props, next_state)
  • [x] componentDidUpdate - after_update(prev_props, prev_state)
  • [x] componentWillUnmount - before_unmount
  • [x] componentDidCatch - after_error(error, info)

Copied from original issue: zetachang/react.rb#2 meanwhile updated, more or less

catmando avatar Jun 09 '16 19:06 catmando

From @ajjahn on October 30, 2015 14:32

@catmando Of the unchecked items in this list, do you know if any have been implemented?

catmando avatar Jun 09 '16 19:06 catmando