This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function HelloWorld(props) { | |
| return <div>Hello {props.name}!</div>; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import PropTypes from 'prop-types'; | |
| const Experiment = ({ isInTestGroup, renderA, renderB }) => { | |
| if (isInTestGroup) { | |
| return renderB(); | |
| } | |
| return renderA(); | |
| }; | |
| Experiment.propTypes = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import Experiment from './experiment'; | |
| const ExperimentUsage = () => ( | |
| <Experiment | |
| isInTestGroup={false} | |
| renderA={() => ( | |
| <p>Output of renderA()!</p> | |
| )} | |
| renderB={() => ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import ReactDOM from "react-dom"; | |
| import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; | |
| import App from "./components/app"; | |
| import Home from "./components/home"; | |
| ReactDOM.render( | |
| <Router> | |
| <Switch> | |
| <Route path="/home" component={Home} /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus feugiat eros ac mi lobortis, eu dignissim leo sagittis. Quisque et convallis elit. Ut ac lorem massa. Aliquam tempor molestie eros vitae lobortis. Nullam dignissim orci et urna cursus, quis placerat mauris facilisis. Praesent scelerisque ligula est, eu venenatis orci vehicula nec. Cras ut nisl condimentum, cursus diam id, mattis elit. Pellentesque vitae neque sit amet tellus vestibulum egestas. Morbi a magna gravida, tincidunt elit non, egestas augue. Suspendisse tincidunt a orci vel bibendum. Cras consequat metus in erat venenatis consequat. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam consequat ex nec laoreet sodales. Nullam porta metus sed rutrum vestibulum. | |
| Sed ac orci a est bibendum vehicula. Aliquam eu egestas leo. Vestibulum tempus, neque at lacinia molestie, erat velit scelerisque ipsum, ut tincidunt turpis tellus sed lacus. In rhoncus, ligula in interdum tincidunt, nulla turpis scelerisq |
OlderNewer