Releases: shogowada/scalajs-reactjs
Releases · shogowada/scalajs-reactjs
v0.14.0
Breaking changes:
- Make Redux containers take
Props[OwnProps]
instead ofOwnProps
- Now Redux containers can access router props (e.g. location, history, and match).
- This enables to better separate container components and presentational components for components that need router props.
- Now Redux containers can access router props (e.g. location, history, and match).
v0.13.1
v0.13.0
Features:
- Add react-router-redux facade
Breaking changes:
- Change signature of reducer from
(Option[State], Action) => State
to(Option[State], Any) => State
- This is to make facade friendly for extensions (e.g. react-router-redux support).
- Change package of
History
fromio.github.shogowada.scalajs.reactjs.router
toio.github.shogowada.scalajs.history
v0.12.0
v0.11.0
Breaking changes:
- Use DOMs from scalajs-dom instead of custom facade
- Change
CheckBoxFormSyntheticEvent
toFormSyntheticEvent[HTMLInputElement]
- Change
InputFormSyntheticEvent
toFormSyntheticEvent[HTMLInputElement]
- Change
OptionFormSyntheticEvent
toFormSyntheticEvent[HTMLOptionElement]
- Change
RadioFormSyntheticEvent
toFormSyntheticEvent[HTMLInputElement]
- Change
TextAreaFormSyntheticEvent
toFormSyntheticEvent[HTMLTextAreaElement]
- Change
ReactHTMLCheckBoxElement
toHTMLInputElement
- Change
ReactHTMLInputElement
toHTMLInputElement
- Change
ReactHTMLOptionElement
toHTMLOptionElement
- Change
ReactHTMLRadioElement
toHTMLInputElement
- Change
ReactHTMLTextAreaElement
toHTMLTextAreaElement
- Change
v0.10.0
v0.9.1
v0.9.0
v0.8.0
Enhancements:
- Migrated from react-router v3 to v4
Breaking changes:
- Drop support for Scala 2.11
- It was having issue resolving WebBrowser class for no obvious reason.
- react-router is renamed to react-router-dom
- Underlying library is split into react-router and react-router-dom. We want to use the -dom for web applications.
- When rendering components, use
instead of
<(new MyClassSpec())(/* props */)(/* children */)
(new MyClassSpec())(/* props */)(/* children */)
- Use
^.wrapped
to assign custom props andprops.wrapped
to access themThis means you can now assign standard props with ease.object MyComponent { case class WrappedProps(message: String) } class MyComponent extends StatelessReactClassSpec[MyComponent.WrappedProps] { override def render(): ReactElement = <.div()(props.wrapped.message) } ReactDOM.render( <(new MyComponent())(^.wrapped := MyComponent.WrappedProps(message = "Hi"))(), mountNode )
And access standard props with no workaround (e.g.ReactDOM.render( <(new MyComponent())( ^.id := "my-component", ^.wrapped := MyComponent.WrappedProps(message = "Hi") )(), mountNode )
children
method).class MyComponent extends StaticReactClassSpec { override def render(): ReactElement = <.div()(props.children) }
- Use
props.children
to access children instead ofchildren
- Use
RouterProps
trait instead ofRoutedReactClassSpec[Params]
to access router props- Use
props.history
,props.location
, andprops.match
to access router props
- Use
- Use
<.Provider(^.store := store)(<(App()).empty)
instead of<.Provider(store = store)(App())