Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Component.js
- class MyComponent extends React.Component {
- render() {
- <div> {this.props.myData} </div>
- }
- }
- initComponent(data) {
- ReactDOM.render(
- <MyComponent myData={data} />
- )
- }
- // ComponentPage.scala.html
- ...
- <script>
- $(() => initComponent(@scala.serverVariable.getData(currentUser))
- </script>
Add Comment
Please, Sign In to add comment