# [react native] 로또 번호 생성기

- 주소: https://duotone.co.kr/entry/react-native-%EB%A1%9C%EB%98%90-%EB%B2%88%ED%98%B8-%EC%83%9D%EC%84%B1%EA%B8%B0
- 글쓴이: 서기㏇
- 카테고리: 개발·프로그래밍
- 작성일: 2021-02-18
- 태그: Lotto, NATIVE, React, 로또, 번호, 생성기, 앱

```
import { StatusBar } from 'expo-status-bar';
import React, { useEffect, useState } from 'react';
import { Button, StyleSheet, Text, View } from 'react-native';

export default function App() {

  const [lotto, setLotto] = useState([]);

  function makeLotto(){
    let i = 0;
    let lnumber = [];
    let rnumber = 0;

    let lottos = [];
    let a = 0;

    for(i=1; i{
    makeLotto();
  },[]);

  return (

      로또앱

      makeLotto()} />

       {lotto.toLocaleString()}

  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});
```
