Releases: shogowada/scalajs-reactjs
Releases · shogowada/scalajs-reactjs
v0.7.0
Breaking changes:
- Router components now take any attributes
- Change this
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())() )
<.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"))
- Change this
v0.6.6
v0.6.5
v0.6.4
v0.6.3
v0.6.2
v0.6.1
v0.6.0
- 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]
andStaticReactClassSpec
Router changes
- Breaking: Type for params is now set via type parameter, and
RoutedReactClassSpec
is now a separate trait thanReactClassSpec
// 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
v0.5.0
- Upgrade React version to 15.4.2 from 15.3.2.
- Support all the React events.
Breaking changes:
ElementSyntheticEvent
is renamed toFormSyntheticEvent
.CheckBoxElementSyntheticEvent
is renamed toCheckBoxFormSyntheticEvent
.InputElementSyntheticEvent
is renamed toInputFormSyntheticEvent
.OptionElementSyntheticEvent
is renamed toOptionFormSyntheticEvent
.RadioElementSyntheticEvent
is renamed toRadioFormSyntheticEvent
.TextAreaElementSyntheticEvent
is renamed toTextAreaFormSyntheticEvent
.