私はreact-native
アプリで取り組んでいます。私はreact-native
アプリの開発のためにテキストエディタを使用しています。どのように原子の反応ネイティブのコードを書式設定
react-native
のコードをアトミックにフォーマットするためのショートカットが見つかりませんでした。私はパッケージhttps://atom.io/packages/atom-beautifyを美化しようとしましたが、動作しません。
import React, {
Component
} from 'react';
import {
AppRegistry,
Image,
View,
Text,
Button,
StyleSheet
} from 'react-native';
class SplashScreen extends Component {
render() {
return (<
View style = {
styles.container
} >
<
Image source = {
require('./img/talk_people.png')
}
style = {
{
width: 300,
height: 300
}
}
/> <
Text style = {
{
fontSize: 22,
textAlign: 'center',
marginTop: 30
}
} > Never forget to stay in touch with the people that matter to you. < /Text> <
View style = {
{
marginTop: 30
}
} > < Button title = "CONTINUE"
color = "#FE434C"/> < /View> <
/View>
);
}
}
const styles = StyleSheet.create({
container: {
backgroundColor: '#FFFFFF',
margin: 50,
alignItems: 'center',
flex: 1,
flexDirection: 'column'
}
})
AppRegistry.registerComponent('Scheduled',() => SplashScreen);
現在、atom-beautifyはJSXをサポートしていません。問題[JSX構文(ReactJS)のサポート](https://github.com/Glavin001/atom-beautify/issues/144)の問題を参照してください。 [atom-react](https://orktes.github.io/atom-react/#indentation)パッケージを使用できます。 – Tushar
@Tushar他のパッケージ? –
[babel/jsx javascriptファイルでフォーマットするためにatom-beautifyパッケージを設定する方法は?](// stackoverflow.com/q/37232310) – Tushar