Skip to content

Releases: shogowada/scalajs-reactjs

v0.7.0

12 Apr 12:11
Compare
Choose a tag to compare

Breaking changes:

  • Router components now take any attributes
    • Change this
      <.Router(history = HashHistory)(
      <.Route(path = "/", component = new App())(
        <.Route(path = "about", component = new About())(),
        <.Route(path = "repos", component = new Repos())(
          <.Route(path = ":id", component = new Repo())()
        ),
        <.Route(path = "form", component = new Form())()
      )
      to this
      <.Router(^.history := HashHistory)(
            // ^.        :=
      <.Route(^.path := "/", ^.component := new App())(
        <.Route(^.path := "about", ^.component := new About())(),
        <.Route(^.path := "repos", ^.component := new Repos())(
          <.Route(^.path := ":id", ^.component := new Repo())()
        ),
        <.Route(^.path := "form", ^.component := new Form())()
      )
    • This adds some boilerplate code (^. and :=), but you can now do this:
      <.Link(^.to := "/login", ^.className := Set("btn", "btn-default"))

v0.6.6

09 Apr 19:08
Compare
Choose a tag to compare
  • Stopped directly depending on fbjs
  • Stopped temporarily mutating props and state inside default shouldComponentUpdate

v0.6.5

08 Apr 18:48
Compare
Choose a tag to compare
  • Migrated to create-react-class from React.createClass
    • React.createClass was deprecated and will be moved from v16.

v0.6.4

05 Apr 02:42
Compare
Choose a tag to compare
  • Fixed bug where it wasn't rendering "className" attribute correctly

v0.6.3

03 Apr 00:33
Compare
Choose a tag to compare

Changes:

  • Enhanced react-router facade
    • Added router, location, route, and routes methods to RoutedReactClassSpec
    • Added WithRouter higher order component factory

v0.6.2

31 Mar 11:09
Compare
Choose a tag to compare
  • Optimize default implementation of shouldComponentUpdate
  • Fix signature of Provider from ReactRedux
    • It used to be taking multiple children, while it only allows one child.

v0.6.1

23 Mar 11:38
Compare
Choose a tag to compare
  • You can pass render function to container components created by ReactRedux.connect.
    ReactRedux.connect(/* ... */)((props: Props) => <.div()(props.foo))
    ReactRedux.connect(/* ... */)((props: Props, children: ReactElement) => <.div()(props.foo, children))

v0.6.0

22 Mar 23:56
Compare
Choose a tag to compare
  • Add react-readux facade

React changes

  • Breaking: Types for props and state are now set via type parameter
    • This is so that we can deal with types more safely and seamlessly.
    // Change this
    class HelloWorld extends ReactClassSpec {
      override type Props = HelloWorld.Props
      override type State = HelloWorld.State
    }
    // to this
    class HelloWorld extends ReactClassSpec[HelloWorld.Props, HelloWorld.State]
  • Breaking: Children are now accessed via children method
    // Change this
    def render() = <.div()(props.children)
    // to this
    def render() = <.div()(children)
  • Add PropslessReactClassSpec[State] and StaticReactClassSpec

Router changes

  • Breaking: Type for params is now set via type parameter, and RoutedReactClassSpec is now a separate trait than ReactClassSpec
    // Change this
    class HelloWorld extends RoutedReactClassSpec {
        override type Params = HelloWorld.Params
        override type State = HelloWorld.State
    }
    // to this
    class HelloWorld extends ReactClassSpec[HelloWorld.Props, HelloWorld.State]
        with RoutedReactClassSpec[HelloWorld.Props]
    // or change this
    class HelloWorld extends StatelessRoutedReactClassSpec {
      override type Params = HelloWorld.Params
    }
    // to this
    class HelloWorld extends StatelessReactClassSpec[HelloWorld.Props]
        with RoutedReactClassSpec[HelloWorld.Params]
  • Breaking: Params are now accessed via params method
    // Change this
    def render() = <.div()(props.params.foo)
    // to this
    def render() = <.div()(params.foo)

v0.5.1

25 Jan 11:16
Compare
Choose a tag to compare
  • #10 Support lifecycle methods.

v0.5.0

22 Jan 13:45
Compare
Choose a tag to compare
  • Upgrade React version to 15.4.2 from 15.3.2.
  • Support all the React events.

Breaking changes:

  • ElementSyntheticEvent is renamed to FormSyntheticEvent.
    • CheckBoxElementSyntheticEvent is renamed to CheckBoxFormSyntheticEvent.
    • InputElementSyntheticEvent is renamed to InputFormSyntheticEvent.
    • OptionElementSyntheticEvent is renamed to OptionFormSyntheticEvent.
    • RadioElementSyntheticEvent is renamed to RadioFormSyntheticEvent.
    • TextAreaElementSyntheticEvent is renamed to TextAreaFormSyntheticEvent.