mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### Why? In preparation for moving all turbopack crates Also makes them easier to work with in general. Closes PACK-3164
31 lines
478 B
JavaScript
31 lines
478 B
JavaScript
import { useEffect } from 'react'
|
|
import { select, selectAll } from 'd3-selection'
|
|
|
|
export default function Home() {
|
|
useEffect(() => {
|
|
new MyClass()
|
|
}, [])
|
|
|
|
return (
|
|
<svg>
|
|
<g className="group">
|
|
<path />
|
|
<path />
|
|
</g>
|
|
|
|
<g className="group">
|
|
<path />
|
|
<path />
|
|
</g>
|
|
</svg>
|
|
)
|
|
}
|
|
|
|
class MyClass {
|
|
constructor() {
|
|
selectAll('.group').each(function () {
|
|
select(this).selectAll('path')
|
|
})
|
|
}
|
|
}
|