Debian Codegraph @

babel-preset-modules/test/integration/react-hooks-demo/index.js

raw symbols SCIP
1 import React, { useState, useContext, createContext } from "react";
2 import ReactDOM from "react-dom";
3 import styled from "styled-components";
4
5 import ThemeContext from "./context";
6
7 import Comments from "./Comments";
8
9 function App(props) {
10 const [theme, setTheme] = useState("light");
11
12 return (
13 <div {...props}>
14 <Comments />
15 </div>
16 );
17 }
18
19 App = styled(App)`
20 font-family: sans-serif;
21 font-family: "Nunito";
22 text-align: center;
23 box-sizing: border-box;
24
25 a {
26 color: inherit;
27 text-decoration: none;
28
29 &:hover {
30 text-decoration: underline;
31 }
32 }
33 `;
34
35 const rootElement = document.getElementById("root");
36 ReactDOM.render(<App />, rootElement);