Comments (19)
Ah, bummer. I understand how that makes things more standardized, but it's like telling someone "we'll help you build your house faster, you just can't use these brands of doors or windows". react-native link
is becoming a pretty standard way to connect libraries, so consider this a feature request :)
from expo.
@JulianKingman yeah, we're aware of the advantages of react-native link
. Fundamentally we have one binary that's in the App Store and Play Store and so we can't support react-native link
for people who are using that binary. If you want custom native code you can use ExponentKit and compile it yourself.
from expo.
Good point about the binary, I didn't think of that. In that case, maybe it would be helpful to have a list of "exponent-safe" or "exponent-recommended" packages, perhaps searchable/installable via the XDE? I don't know, you guys are doing a great job and it seems like it's just a technical limitation that we have to live with.
from expo.
I am a Windows developer. Seems Xcode is needed for detach to ExpoKit to run 'react-native link', right?
Can I do it without a Mac / Xcode?
from expo.
@terribleben does expo allow react-native link react-native-youtube
if no why ?
from expo.
Please see the docs for ExpoKit @andela-cofor https://docs.expo.io/versions/latest/guides/detach.html. Expo supports react-native link
in detached projects.
from expo.
This answer was updated in 2018
- Expo supports
react-native link
if you detach to ExpoKit.- If you are looking for the unrelated topic of linking/deep linking, Expo and React Native both support that as well.
.
the links are dead
from expo.
This answer was updated in 2018
- Expo supports
react-native link
if you detach to ExpoKit. - If you are looking for the unrelated topic of linking/deep linking, Expo and React Native both support that as well.
(old answer below from Feb 2017)
Hi there! A normal Exponent project is completely written in JS, so there isn't a way to modify native libraries (which is what react-native link
does). We designed ExponentKit with the goal of allowing users to address this constraint. So yeah, if react-native link
is required for you, you should detach to ExponentKit.
We think many native libraries are better implemented in JS anyway (e.g. loading fonts) so this is also a philosophical choice. The ExponentKit guide talks a bit more about that.
from expo.
You can already use react-native link
. You just need to do it with ExponentKit. What feature exactly are you requesting?
from expo.
One way it could work is to have a links
property in exp.json
, so you could do something like this:
// exp.json
{
"links": {
"assets": [ "/assets/font.ttf"],
"packages": ["native-npm-package"],
}
}
Then the links would be added to the native bundle. If that's not possible within the exponent app itself, it would still be cool if assets loaded asynchronously within exponent, and then include the native modules to the packaged app.
from expo.
The "link" in react-native link
refers to linking code dependencies. I think you are asking if there is a way to bundle local assets in an Exponent app. In that case, maybe you would be interested in this guide.
If that's not what you're asking, sorry if I'm mistaken!
from expo.
Hi @JulianKingman!
There are a couple of things worth mentioning here:
-
If you want to load your fonts synchronously before displaying your app, you can follow the pattern here: https://github.com/exponent/new-project-template/blob/master/main.js#L30-L70 -- this downloads and caches your font while the splash screen is being displayed, and then renders the app. If you've already downloaded the font (anytime after first load), then it is instant.
-
I think that having an option to bundle assets in the ipa/apk for standalone apps would be valuable so everything you need can be downloaded when you get the app from App/Play Store, we haven't got around to that yet so hopefully downloading and caching while the splash screen is up will work for you!
from expo.
@brentvatne that's a cool pattern, I'll give it a shot, and I didn't know about the caching, which is another bonus. I think your 2nd point is right-on, but also linking has broader usages beyond just assets. For example, one of my current projects links these things:
- assets (i.e. fonts)
- react-native-fabric (I realize exponent has it's own system for this, but maybe it wouldn't need to)
- react-native-snackbar (uses native components, behind-the-scenes)
- react-native-vector-icons
- realm
These add necessary native code that links their package into the build, extending the built-in react native native functionality (like initializing realm).
from expo.
Just to add, this could reduce a lot of overhead for exponent as you wouldn't need built in unique exponent functions for everything (like fabric, facebook, etc... although those are pretty cool as direct exponent extensions.).
from expo.
Yeah that's a good idea. We're definitely open to doing something like that.
from expo.
@jesseruder it's not working with RNFetchBlob when running on XDE. It worked when running on Xcode.
from expo.
Also the documentation is kind trick. It suggests react-native link
should be supported which doesn't mean it is supported.
from expo.
@faustoct react-native link
is supported in detached apps. I'd recommend reading these docs: https://docs.expo.io/versions/latest/guides/detach.html
from expo.
@jesseruder, worked. Had to recreate my project, move files, then detach with ExpoKit option.
from expo.
Related Issues (20)
- [expo-updates] android build error java.io.FileNotFoundException sqlitejdbc.dll.lck HOT 3
- Memory leak with newly created project via npx create-expo-app
- Exposed types for `Stack.Screen` options is incorrect HOT 1
- Exposed types for `Stack.Screen` options is incorrect
- [expo-sqlite/next] Unable to query existing database HOT 1
- Getting undocumented "boundingBox" in the BarcodeScanningResult on Samsung SM-N9700 HOT 1
- Issue with react native 0.70.15 HOT 3
- App crash after sentry implementation HOT 1
- Config Command isn't populating currentFullName & originalFullName HOT 1
- [Calendar] - Android calendar is returning isPrimary with wrong value
- XMLHttpRequestUpload events not firing in Expo Go 49+ HOT 1
- [expo-image] support for updated cached image against url HOT 1
- [expo-location] requestForegroundPermissionsAsync() is never resolved on native iOS
- If query parameters of a link contains brackets then expo router removes that query parameter HOT 3
- Expo SDK 50 - SQLite causes issues on Android
- Linear Gradient Changing orientation to 90deg when changing screen HOT 2
- [SDK50] Consistent KeyChainException with expo-secure-store usage
- expo-camera/next video quality not working HOT 1
- I can't build my android apk, It seems that the node command cannot be found HOT 2
- FetchError: request to https://api.expo.dev/v2/sdks/50.0.0/native-modules failed, reason: unable to verify the first certificate HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expo.