All notable changes to this project will be documented in this file starting with v0.8.6. This project tries to adhere to Semantic Versioning, even before v1.0.
Changes are grouped as follows:
- Added for new features.
- Changed for changes in existing functionality.
- Deprecated for once-stable features to be removed in upcoming releases.
- Removed for deprecated features removed in this release.
- Fixed for any bug fixes.
- Security to invite users to upgrade in case of vulnerabilities.
React::Serveris provided as a module wrapping the originalReactDOMServerAPI, requirereact/serverto use it. (#186)React::Configis introduced,environmentis the only config option provided for now. See #204 for usage details.
- State syntax is now consistent with Hyperloop::Store, old syntax is deprecated. (#209, #97)
- Current ref callback behavior is deprecated. Require
"react/ref_callback"to get the updated behavior. (#188) React.render_to_string&React.render_to_static_markupis deprecated, useReact::Server.render_to_string&React::Server.render_to_static_markupinstead. (#186)react/react-sourceis deprecated, usereact/react-source-browserorreact/react-source-serverinstead. For most usecase,react/react-source-browseris sufficient. If you are using the built-in server side rendering feature, the actualReactDOMServeris already provided by thereact-railsgem. Therefore, unless you are building a custom server side rendering mechanism, it's not suggested to usereact/react-source-serverin browser code. (#186)
react-latest&react-v1xis removed. Usereact/react-source-browserorreact/react-source-serverinstead.- Support for Ruby < 2.0 is removed. (#201)
- [NativeLibrary] Passing native JS object as props will raise exception. (#195)
- Returns better error message if result of rendering block is not suitable (#207)
- Batch all state changes and execute after rendering cycle (#206, #178) (Code is now moved to Hyper::Store)
You can revert to the old behavior by defining theReact::State::ALWAYS_UPDATE_STATE_AFTER_RENDER = false - Memory Leak in render context fixed (#192)
- The whole opal-activesuppport is not loaded by default now. This gave us about 18% size reduction on the built file. If your code rely on any of the module which is not required by hyper-react, you need to require it yourself. (#135)
- Current
React.renderbehavior is deprecated. Require"react/top_level_render"to get the updated behavior. (#187) React.is_valid_elementis deprecated in favor ofReact.is_valid_element?.expect(component).to render('<div />')is now deprecated in favor ofexpect(component).to render_static_html('<div />'), which is much clearer.
ReferenceError: window is not definederror in prerender context with react-rails v1.10.0. (#196)- State might not be updated using
React::Observablefrom a param. (#175) - Arity checking failed for
_react_param_conversion&React::Element#initialize(#167)
- This gem is now renamed to
hyper-react, see UPGRADING for details.
- ReactJS functional stateless component could not be imported from
NativeLibrary. Note that functional component is only supported in React v14+. (#162) - Prerender log got accumulated between reqeusts. (#176)
react/react-sourceis the suggested way to include ReactJS sources now. Simply requirereact/react-sourceimmediately before therequire "reactrb"in your Opal code will make it work.
react-latest&react-v1xis deprecated. Usereact/react-sourceinstead.
opal-browseris removed from runtime dependency. (#133) You will have to addgem 'opal-browser'to your gemfile (recommended) or remove all references to opal-browser from your manifest files.
$window#oninopal-jqueryis broken. (#166)Element#rendertrigger unnecessary re-mounts when called multiple times. (#170)- Gets rid of react warnings about updating state during render (#155)
- Multiple HAML classes (i.e. div.foo.bar) was not working (regression introduced in 0.8.8)
- Don't send nil (null) to form components as the value string (#157)
- Process
params(props) correctly when usingElement#onorElement#render(#158) - Deprecate shallow param compare (#156)
- More helpful error messages on render failures (#152)
Element#on('<my_event_name>')subscribes tomy_event_name(#153)
Element#on(:event)subscribes toon_eventfor reactrb components andonEventfor native components. (#153)
Element#on(:event)subscription to_onEventis deprecated. Once you have changed params named_on...toon_...you canrequire 'reactrb/new-event-name-convention.rb'to avoid spurious react warning messages. (#153)
- The
Element['#container'].render...method generates a spurious react error (#154)
- Opal 0.10.x compatibility
- Method missing within a component was being reported as
incorrect const name(#151)