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

onLoadingComplete deprecation notice #471

Open
2 of 3 tasks
jonsherrard opened this issue Apr 25, 2024 · 3 comments
Open
2 of 3 tasks

onLoadingComplete deprecation notice #471

jonsherrard opened this issue Apr 25, 2024 · 3 comments

Comments

@jonsherrard
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Do you want this issue prioritized?

  • Yes, I have sponsored
  • Not urgent

Current Behavior

image

Next have deprecated onLoadingComplete in favor of onLoad.

https://nextjs.org/docs/pages/api-reference/components/image#onloadingcomplete

Would it be possible to update the prop name in SolitoImage to kill off this warning.

Expected Behavior

No warnings.

Steps To Reproduce

Use Solito with latest version of Next.js

Versions

- Solito: 4.2.2
- Next.js: 14.1.3
- Expo:
- React Native:

Screenshots

image

Reproduction

just add onLoadingComplete prop with a void function and you'll get the warning on any SolitoImage component

@nandorojo
Copy link
Owner

Happy to merge this!

@jonsherrard
Copy link
Author

jonsherrard commented Apr 26, 2024

Hi @nandorojo! Thanks again for everything Solito and Solito adjacent

I'm super happy to put in some time to this. Do you think you could. help me out (and others) with a little bit more help on how to develop Solito locally?

For instance - wanted to develop inside my app, do you think that's possible with yarnk link?

I installed expo-module-scripts and ran a build, but no matter I try I get stuck with this error from next:

Failed to compile
../../open-source/solito/build/link/core.js:3:0
Module not found: Can't resolve 'react-native'
  1 | 'use client';
  2 | import { jsx as _jsx } from "react/jsx-runtime";
> 3 | import { Platform } from 'react-native';
  4 | import { openURL } from './linking';
  5 | import { NextLink } from './next-link';
  6 | import { useLink } from './use-custom-link';

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
../../open-source/solito/build/link/index.js
../../open-source/solito/link/index.js
./src/components/web-only/nav/index.tsx
./pages/_app.tsx
This error occurred during the build process and can only be dismissed by fixing the error.

This is in a fully functioning Solito app with Tamagui so I know react-native is installed.

Any ideas or extra pointers?

@nandorojo
Copy link
Owner

Yeah sure thing…this is what happened after all the yarn link steps? I actually haven’t done this particular thing locally with solito, I always just publish it after testing its test app.

It doesn’t look like your app is using yarn link. Instead it appears to be importing directly from the solito repo which is wrong.

I think you’d need to run yarn prepare in the sólito repo, then follow the yarn link steps, and then install it locally with link as well

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

No branches or pull requests

2 participants