Skip to content

Releases: shogowada/scalajs-reactjs

v0.14.0

09 May 12:38
Compare
Choose a tag to compare

Breaking changes:

  • Make Redux containers take Props[OwnProps] instead of OwnProps
    • 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.

v0.13.1

30 Apr 16:32
Compare
Choose a tag to compare

Enhancements:

  • Make OnEventAttribute extensible

v0.13.0

29 Apr 22:10
Compare
Choose a tag to compare

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 from io.github.shogowada.scalajs.reactjs.router to io.github.shogowada.scalajs.history

v0.12.0

28 Apr 05:25
Compare
Choose a tag to compare

Enhancements:

  • Support Redux middlewares

Breaking changes:

  • Store now takes state as type parameter
    • Change Store to Store[State] where State is the Redux state you are using.

v0.11.0

22 Apr 15:18
Compare
Choose a tag to compare

Breaking changes:

  • Use DOMs from scalajs-dom instead of custom facade
    • Change CheckBoxFormSyntheticEvent to FormSyntheticEvent[HTMLInputElement]
    • Change InputFormSyntheticEvent to FormSyntheticEvent[HTMLInputElement]
    • Change OptionFormSyntheticEvent to FormSyntheticEvent[HTMLOptionElement]
    • Change RadioFormSyntheticEvent to FormSyntheticEvent[HTMLInputElement]
    • Change TextAreaFormSyntheticEvent to FormSyntheticEvent[HTMLTextAreaElement]
    • Change ReactHTMLCheckBoxElement to HTMLInputElement
    • Change ReactHTMLInputElement to HTMLInputElement
    • Change ReactHTMLOptionElement to HTMLOptionElement
    • Change ReactHTMLRadioElement to HTMLInputElement
    • Change ReactHTMLTextAreaElement to HTMLTextAreaElement

v0.10.0

20 Apr 01:39
Compare
Choose a tag to compare

Breaking changes:

  • Remove ReactClassSpec
    • Use React.createClass instead
    • See Basics for updated documentation

v0.9.1

16 Apr 22:27
Compare
Choose a tag to compare
  • Added redux-devtools-extension facade

v0.9.0

16 Apr 00:41
Compare
Choose a tag to compare

Breaking changes:

  • ReactRedux.connectAdvanced()() returns ReactClass instead of ContainerComponent
    • Use <(reactClass).empty or <(reactClass)(attributes)(children) to render them.

v0.8.0

15 Apr 23:10
Compare
Choose a tag to compare

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
    <(new MyClassSpec())(/* props */)(/* children */)
    instead of
    (new MyClassSpec())(/* props */)(/* children */)
  • Use ^.wrapped to assign custom props and props.wrapped to access them
    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
    )
    This means you can now assign standard props with ease.
    ReactDOM.render(
      <(new MyComponent())(
        ^.id := "my-component",
        ^.wrapped := MyComponent.WrappedProps(message = "Hi")
      )(),
      mountNode
    )
    And access standard props with no workaround (e.g. children method).
    class MyComponent extends StaticReactClassSpec {
      override def render(): ReactElement = <.div()(props.children)
    }
  • Use props.children to access children instead of children
  • Use RouterProps trait instead of RoutedReactClassSpec[Params] to access router props
    • Use props.history, props.location, and props.match to access router props
  • Use <.Provider(^.store := store)(<(App()).empty) instead of <.Provider(store = store)(App())

v0.7.1

14 Apr 01:06
Compare
Choose a tag to compare
  • Fixed bug where you cannot wrap ReactClass with container components