Guest User

Untitled

a guest
Nov 20th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. // Component.js
  2. class MyComponent extends React.Component {
  3. render() {
  4. <div> {this.props.myData} </div>
  5. }
  6. }
  7. initComponent(data) {
  8. ReactDOM.render(
  9. <MyComponent myData={data} />
  10. )
  11. }
  12.  
  13. // ComponentPage.scala.html
  14. ...
  15. <script>
  16. $(() => initComponent(@scala.serverVariable.getData(currentUser))
  17. </script>
Add Comment
Please, Sign In to add comment