はじめに データビジュアライゼーションのライブラリであるD3.jsをReact+TypeScriptと一緒に使ってみたのでそれの紹介です。 バージョン TypeScript+Reactの作業環境に加えて、d3と@types/d3をインストールします。 TypeScript - 3.6.3 React - 16.9.0 d3 - 5.12.0 @types/d3 - 5.7.2 D3でDOM操作をしてみる ディレクトリ構成 d3test |--node_modules |--src | |--components | | |--test.tsx | |--index.html | |--index.tsx |--package.json |--tsconfig.json ./src/index.html <!DOCTYPE html> <html> <head> <meta charset=
![D3をReact+TypeScriptと一緒に使ってみる | Qrunch(クランチ)](https://cdn-ak-scissors.b.st-hatena.com/image/square/3214508d1a934f35625188f5cdbbce5c5b2b6bec/height=288;version=1;width=512/https%3A%2F%2Fs3.qrunch.io%2FYEBt9Rsh9zT4xk3PYEVVGGcIl9pat45N.png)