-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Correct props - Create react element via <(ReactClassSpec)(attribute: Any*)(contents: Any*) method - Specify props via ^.wrapped attribute - Use props.children to access children - Use props.router, props.location, etc to access router props * Fix travis CI * Use Chrome instead * Fix travis CI * Fix travis CI * Remove children method It is replaced by props.children * Create react-router-dom facade * Drop 2.11 support It was having issue resolving class for WebBrowser for no obvious reason. * Update README.md * Update documentations Close #26 * Drop Scala 2.11 from travis * Update README.md * Remove comments * Update documents * Update README.md * Update Main.scala * Loosen selenium version Travis is having issue finding 3.3.1 * Try installing newer chromdriver * Revert manually downloding chromedriver * Install google-chrome-stable * Revert "Install google-chrome-stable" This reverts commit d1f45c3. * Install Chrome * Use chromedriver 2.28 According to https://bugs.chromium.org/p/chromedriver/issues/detail?id=1467, it has the fix for alert hanging. * Ignore unexpected alert * Use singleton FirefoxDriver * Install geckodriver * Fix gecko download path * Do not use trusty
- Loading branch information
Showing
46 changed files
with
788 additions
and
1,144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
# Facade for react and react-dom | ||
# scalajs-reactjs | ||
|
||
## API References | ||
|
||
- [`React`](./src/main/scala/io/github/shogowada/scalajs/reactjs/React.scala) | ||
- [`ReactDOM`](./src/main/scala/io/github/shogowada/scalajs/reactjs/ReactDOM.scala) | ||
- [`VirtualDOM`](./src/main/scala/io/github/shogowada/scalajs/reactjs/VirtualDOM.scala) | ||
- [`ReactClassSpec`](./src/main/scala/io/github/shogowada/scalajs/reactjs/classes/specs/ReactClassSpec.scala) | ||
- [`ReactHTMLElements`](./src/main/scala/io/github/shogowada/scalajs/reactjs/elements/ReactHTMLElements.scala) | ||
- [`SyntheticEvent`](./src/main/scala/io/github/shogowada/scalajs/reactjs/events/SyntheticEvent.scala) | ||
- [`FormSyntheticEvent`](./src/main/scala/io/github/shogowada/scalajs/reactjs/events/FormSyntheticEvent.scala) | ||
A facade for react and react-dom |
21 changes: 0 additions & 21 deletions
21
core/src/main/scala/io/github/shogowada/scalajs/reactjs/Converters.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 2 additions & 22 deletions
24
core/src/main/scala/io/github/shogowada/scalajs/reactjs/ReactDOM.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,13 @@ | ||
package io.github.shogowada.scalajs.reactjs | ||
|
||
import io.github.shogowada.scalajs.reactjs.classes.specs.ReactClassSpec | ||
import io.github.shogowada.scalajs.reactjs.elements.ReactElement | ||
import org.scalajs.dom | ||
|
||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.JSImport | ||
|
||
/** Facade for react-dom */ | ||
object ReactDOM { | ||
/** Mounts [[ReactClassSpec]] to given node */ | ||
def render[Props, State](reactClassSpec: ReactClassSpec[Props, State], node: dom.Node): Unit = { | ||
render(React.createElement(reactClassSpec), node) | ||
} | ||
|
||
/** Mounts [[ReactClassSpec]] with its props to given node */ | ||
def render[Props, State](reactClassSpec: ReactClassSpec[Props, State], props: Props, node: dom.Node): Unit = { | ||
render(React.createElement(reactClassSpec, props), node) | ||
} | ||
|
||
/** Mounts [[ReactElement]] to given node */ | ||
def render(element: ReactElement, node: dom.Node): Unit = { | ||
NativeReactDOM.render(element, node) | ||
} | ||
} | ||
|
||
@js.native | ||
@JSImport("react-dom", JSImport.Namespace) | ||
object NativeReactDOM extends js.Object { | ||
|
||
def render(element: ReactElement, node: dom.Node): Unit = js.native | ||
object ReactDOM extends js.Object { | ||
def render(element: ReactElement, node: dom.Node): js.Any = js.native | ||
} |
Oops, something went wrong.