Skip to content

Commit

Permalink
Add remaining methods from ReactDOMServer
Browse files Browse the repository at this point in the history
  • Loading branch information
shadaj committed Dec 29, 2017
1 parent 7666537 commit 47cf0ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
+ **BREAKING**: Stateless components that use the `@react` macro annotation must extend the `StatelessComponent` class instead of just `Component` [PR #69](https://github.com/shadaj/slinky/pull/69)
+ **BREAKING**: Callbacks passed to `setState` are now Scala functions, so there is no need to force implicit conversions [PR #71](https://github.com/shadaj/slinky/pull/71)
+ **BREAKING**: The tag construction flow now requires attributes to come before children. In addition, an empty list of attributes is no longer allowed [PR #73](https://github.com/shadaj/slinky/pull/73)
+ Add remaining methods from ReactDOMServer, including those introduced in React 16 [PR #83](https://github.com/shadaj/slinky/pull/83)
+ Add support for all `ReactElement` types introduced in React 16, such as numbers and booleans [PR #83](https://github.com/shadaj/slinky/pull/83)
+ Add support for error boundaries, which were added in React 16 [PR #82](https://github.com/shadaj/slinky/pull/82)
+ Add a `*` tag for external components that can take any attribute [PR #81](https://github.com/shadaj/slinky/pull/81)
Expand Down
4 changes: 4 additions & 0 deletions web/src/main/scala/me/shadaj/slinky/web/ReactDOM.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ object ReactDOM extends js.Object {
@JSImport("react-dom/server", JSImport.Namespace, "ReactDOMServer")
object ReactDOMServer extends js.Object {
def renderToString(element: ReactElement): String = js.native
def renderToStaticMarkup(element: ReactElement): String = js.native

def renderToNodeStream(element: ReactElement): js.Object = js.native
def renderToStaticNodeStream(element: ReactElement): js.Object = js.native
}

0 comments on commit 47cf0ba

Please sign in to comment.