Skip to content

Commit

Permalink
Revert "fix(Text): lazy import Troika for Next issue (#1726)"
Browse files Browse the repository at this point in the history
This reverts commit a4da557.
  • Loading branch information
CodyJasonBennett authored Dec 26, 2023
1 parent a82d0d4 commit d880dfb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import * as React from 'react'
// @ts-ignore
import { Text as TextMeshImpl, preloadFont } from 'troika-three-text'
import { ReactThreeFiber, useThree } from '@react-three/fiber'
import { suspend } from 'suspend-react'
import { ForwardRefComponent } from '../helpers/ts-utils'
Expand Down Expand Up @@ -52,9 +54,6 @@ export const Text: ForwardRefComponent<Props, any> = /* @__PURE__ */ React.forwa
}: Props,
ref: React.ForwardedRef<any>
) => {
// https://github.com/pmndrs/drei/issues/1725
const { Text: TextMeshImpl, preloadFont } = suspend(async () => import('troika-three-text'), [])

const invalidate = useThree(({ invalidate }) => invalidate)
const [troikaMesh] = React.useState(() => new TextMeshImpl())

Expand Down

0 comments on commit d880dfb

Please sign in to comment.