Skip to content

Instantly share code, notes, and snippets.

@oksep
Last active November 28, 2016 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oksep/60be1e2ff52cc32101ff9e4e83e3c674 to your computer and use it in GitHub Desktop.
Save oksep/60be1e2ff52cc32101ff9e4e83e3c674 to your computer and use it in GitHub Desktop.
WebStorm add file templates

Follow

  1. open settings & click File and Code Templates
  2. add a new one template, named JSX View Template
  3. copy template.js into the textarea & click apply
  4. new File & select JSX View Template
// @flow
'use strict';
import React, {Component} from 'react';
import {View, StyleSheet} from 'react-native';
export default class ${NAME} extends Component {
constructor(props) {
super(props);
this.state = {
};
}
render() {
return (
<View style={styles.container}>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
}
});
${NAME}.defaultProps = {
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment