Share
Sign In
📄

map - 컴포넌트를 반복해서 사용해야 한다면?

컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>
컴포넌트를 반복해서 사용해야 할 때, map을 사용하면 여러개를 정의할 필요 없이 한개만 정의하면 된다.
function PolyGonSapmle({ value }){ // state return ( <div> <div>{value}</div> </div> ) } const VALUES = ['a', 'b', 'c'] function Parent(){ return ( <div> {VALUES.map((value,index) => ( return(<PolyGonSapmle key={index} value={value} />); ))} </div> ) } <button type="button" onClick={handleShowPolygon}>show / hide</button>