Skip to content

Conversation

@benjaminreid
Copy link
Contributor

This modifies the output of the component command for stateless components.

Example command, yo react-native:component TransactionItem.

// @flow
import React from "react";
import { View, Text } from "./styles";

type Props = {};

const TransactionItem = (props: Props): React$Element<any> => (
  <View>
    <Text>TransactionItem</Text>
  </View>
);

export default TransactionItem;
// @flow
import styled from "styled-components/native";

export const View = styled.View``;

export const Text = styled.Text``;

@benjaminreid benjaminreid self-assigned this Mar 2, 2018
@benjaminreid
Copy link
Contributor Author

@craigcoles How do you feel about this change?

One thing I have thought from this, is Prettier has formatted the generated components for me... Wondering if it’s time to put it across the whole output...

@craigcoles
Copy link
Contributor

@benjaminreid I like it. Looks a lot more concise.

Potentially, I am going to spend some time today removing Atom and reinstalling, as I need Prettier working.

@craigcoles craigcoles self-requested a review March 5, 2018 10:18
Copy link
Contributor

@craigcoles craigcoles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮

@benjaminreid benjaminreid merged commit ca3ad2b into master Mar 5, 2018
@benjaminreid benjaminreid deleted the update-components branch March 5, 2018 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants