Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update demo/index.js to use functional component #551

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update demo/index.js to use functional component
ivanjeremic authored May 15, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 072ea4e9ebed544ba9bc7ea1af40cbcbcc778437
14 changes: 7 additions & 7 deletions templates/react-component/demo/src/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React, {Component} from 'react'
import {render} from 'react-dom'
import React from "react";
import { render } from "react-dom";

import Example from '../../src'

export default class Demo extends Component {
render() {
return <div>
export default function Demo() {
return (
<div>
<h1>{{name}} Demo</h1>
<Example/>
</div>
}
);
}

render(<Demo/>, document.querySelector('#demo'))
render(<Demo />, document.querySelector("#demo"));