tenel-react-kakao-map
TypeScript icon, indicating that this package has built-in type declarations

1.2.9 • Public • Published

tenel-react-kakao-map

스토리북 | 깃허브 | 버그 리포트

Installation

$ npm install react react-dom tenel-react-kakao-map

Getting Started

import * as React from "react";

import * as ReactDOM from "react-dom";

const App: React.FunctionComponent = () => {
  const [container, setContainer] = React.useState<HTMLDivElement>(null);
  const [mapCenter] = React.useState({ lat: 33.450701, lng: 126.570667 });

  return (
    <div ref={(ref) => setContainer(ref)} style={{ width: 800, height: 800 }}>
      {container
        ? (
          <KakaoMaps.Map
            container={container}
            center={mapCenter}
          >
            <KakaoMaps.Marker position={mapCenter}/>
          </KakaoMaps.Map>
        )
        : <span>로드중...</span>
      }
    </div>
  );
};

ReactDOM.render(<App />, document.getElementById("root"))

Readme

Keywords

Package Sidebar

Install

npm i tenel-react-kakao-map

Weekly Downloads

27

Version

1.2.9

License

none

Unpacked Size

126 kB

Total Files

45

Last publish

Collaborators

  • inceptionjh