UNPKG

534 BJavaScriptView Raw
1import React from 'react'
2
3class TestComponent extends React.Component{
4 constructor(props){
5 super(props)
6 const obj = {
7 test: 'Testing.'
8 }
9 this.state = {
10 ...obj
11 }
12 }
13 render(){
14 return (
15 <section>
16 <div>1</div>
17 <div className='test'>{this.state.test}</div>
18 <div>3</div>
19 <style jsx>{`
20 section{
21 lost-utility: clearfix;
22 div{
23 lost-column: 1/3;
24 :nth-of-type(2){
25 color: red;
26 }
27 }
28 }
29 `}</style>
30 </section>
31 )
32 }
33}
34
35export default TestComponent
\No newline at end of file