-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feat/react-native-exports #222
Feat/react-native-exports #222
Conversation
index points to web to avoid breaking changes(?) but also cause that's a good default.
Last thought would be - should |
@drcmda what do you think? @joshuaellis I converted the PR to draft so that we don't merge it until everyone is ok 👍 I think this would break the stories, if paul is ok with the change, we need to also fix the imports ( right now they import from each module file, we should import from index to catch errors early) |
sure that makes sense. Yes it would break the stories, I think I was meant to suggest that we merge this into a beta, to ensure the exports work 100%. I'm working on #223 as well and this is a draft, these could compliment well together and both could be merged into a beta. |
… web index points to web
I've had a bit more of a think about it and I do think it's important to put |
Do you want to do that with a breaking change or keep supporting all imports from index? |
It wouldn't be breaking (i think, feel free to correct me) as the root: import { Loader } from '@react-three/drei' // works
import { Loader } from '@react-three/drei/web' // works
import { Loader } from '@react-three/drei/native' // does not work This would be the same for |
Looks good to me, we'll add a paragraph for Native users in the README 👍 |
Awesome, will do & i'll resolve merge conflicts too. |
* feat: setup TS for stories * fix: eslint was ignore .storybook * feat: add TS to storybook * refactor: move stories to TS (WIP) * refactor: move more stories to TS (WIP) * refactor: src changes for TS move over I think these were TS problems that were missed. * fix: ContactShadows story * refactor: move more stories to TS * refactor: add MapControls.tsx after raising issues in three Two errors linked to three.js: mrdoob/three.js#21058 mrdoob/three.js#21059 * fix: TS errors for passing refs & children * refactor: add more stories (WIP) * fix: useContextBridge TS to accept array of children fixed using DefinitelyTyped/DefinitelyTyped#44572 (comment) because microsoft/TypeScript#14729 * refactor: convert more stories to TS also useGLTF does not need to declare it's type * chore: update storybook * fix: revert useTexture accidentally committed a WIP change * refactor: move stories to TS (WIP) * refactor: revert useGLTF story * Minor type fixes * chore: update react-three-fiber to latest Required for Types * refactor: move stories to TS * fix: shaderMaterial on init returns void, not null * refactor: remove unnecessary type in useFBX * refactor: type Environment stronger there was issues with useAsset not understanding it's types.... * Fixes CSB CI (#230) Co-authored-by: Gianmarco Simone <gianmarcosimone89@gmail.com> Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
if you're using react-native you don't need it.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pmndrs/drei/r0rbvr1o6 |
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 14d5ac2:
|
Conflicts fixed, readme updated, checks are passing 🙌🏼 v2.3.0 here we come! |
@drcmda can you give it a 👍? |
Resolves #221
Resolves #212
Resolves #182
Resolves #19
Looked at what
react-spring
does and used that as a basis for this PR to fix those issues. Created anative
that doesn't includehtml
andloader
and aweb
that includes all.index
importsweb