Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from "react";
- export default class AbSwitcher extends React.Component {
- render() {
- const { condition, a, b } = this.props;
- return condition ? a() : b();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement