Results 1 to 2 of 2

Thread: reactor 1.1.1 now available

  1. #1
    Sencha User Mark.Brocato's Avatar
    Join Date
    Mar 2015
    Location
    Maryland
    Posts
    482
    Answers
    114
    Vote Rating
    54
      0  

    Default reactor 1.1.1 now available

    Sencha has released v1.1.1 of reactor, reactor-webpack-plugin, and reactor-babel-plugin.

    This release contains the following bug fixes:


    • Function props are now properly rebound when updated during rendering. This fixes the issues posted here: http://www.sencha.com/forum/showthread.php?368632
    • Bug: "Variable isDelete undefined in ExtJSComponent#_mergeConfig." This caused an error when attempting to add or remove columns from a grid when rerendering.
    • Bug: "TypeError: Object doesn't support property or method 'forEach' at Anonymous function". This error would show up in the debugger when using ExtReact in Edge or Internet Explorer.


    Of these changes, the first has the most potential to impact existing code. ExtReact previously ignored updates to props whose values are functions (typically event handlers) when rerendering. While defining event handler functions inside of the render function is generally discouraged in react, it is still supported.

    Here is an example that illustrates the bug:

    Code:
    class Counter extends Component {
        state = { count: 0 };
    
        render() {
            const count = this.state.count
    
            return (
                <div>
                    <p>{count}</p>
                    <Button text="Go" handler={() => {
                        this.setState({count: count + 1})
                    }}/>
                </div>
            )
        }
    }
    In this example, clicking the button should increment the displayed count each time. Each time render is called, the button's handler function should be updated. This was not the case in reactor 1.1.0. The count would get stuck at 1 due to the handler function not being updated. This is fixed in reactor 1.1.1.

    This fix may cause your app to behave differently if it relies on handler functions not being updated during rerendering. Fixing this bug actually exposed a few issues in the ExtReact KitchenSink, which we've also fixed. We suggest you review your code to see if it inadvertently relies on this behavior. We also suggest defining handler functions using ES7 property initializers instead of defining them in the render function. For example, the example would be better written as:

    Code:
    class Counter extends Component {
        state = {count: 0};
    
        incrementCount = () => {
            this.setState({ count: this.state.count + 1 });
        };
    
        render() {
            const count = this.state.count
    
            return (
                <div>
                    <p>{count}</p>
                    <Button text="Go" handler={this.incrementCount} />
                </div>
            )
        }
    }
    Finally, while reactor-webpack-plugin and reactor-babel-plugin have been updated to version 1.1.1 as well, no changes were made. We aim to keep the version numbers in sync for all reactor packages to avoid confusion about compatibility.




  2. #2
    Sencha User
    Join Date
    Sep 2017
    Location
    København, Danmark
    Posts
    1
    Vote Rating
    0
      0  

    Default

    Thankyou for the update.

Similar Threads

  1. ReactJS 16.1.0 is out; any Reactor ETA?
    By erinmez in forum Q&A
    Replies: 0
    Last Post: 10 Nov 2017, 5:59 AM
  2. ext-react vs. ext-reactor
    By BennievanderWel in forum Q&A
    Replies: 2
    Last Post: 24 Aug 2017, 10:47 PM
  3. Replies: 9
    Last Post: 16 Jun 2017, 7:54 AM
  4. [CLOSED] Cannot get reactor-boilerplate started
    By dkelly in forum Bugs
    Replies: 2
    Last Post: 18 May 2017, 1:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •