Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: import SpringConfig from @react-spring/three #1563

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

Methuselah96
Copy link
Contributor

Why

The current types fail with strict package managers since it imports from @react-spring/core which is not a direct dependency of @react-three/drei.

ERROR in ./node_modules/@react-three/drei/web/PresentationControls.d.ts:2:30
TS2307: Cannot find module '@react-spring/core' or its corresponding type declarations.
    1 | import * as React from 'react';
  > 2 | import { SpringConfig } from '@react-spring/core';
      |                              ^^^^^^^^^^^^^^^^^^^^
    3 | export declare type PresentationControlProps = {
    4 |     snap?: Boolean | SpringConfig;
    5 |     global?: boolean;

What

Import SpringConfig from @react-spring/three instead of @react-spring/core to fix the error.

Checklist

  • Documentation updated (example) - N/A
  • Storybook entry added (example) - N/A
  • Ready to be merged

Sorry, something went wrong.

@vercel
Copy link

vercel bot commented Jul 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2023 1:11am

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 7, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit b55f1ab:

Sandbox Source
dazzling-alex-493rqd Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration

@drcmda drcmda merged commit b23f4b5 into pmndrs:master Jul 26, 2023
@Methuselah96 Methuselah96 deleted the fix-react-spring-types branch July 26, 2023 21:48
@github-actions
Copy link

🎉 This PR is included in version 9.80.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants