Comments (8)
React native does not allow dynamic string imports the way node does. Neither does frontend in general.
from solito.
Where do you see it’s supported by RN? That issue doesn’t say it is
from solito.
In any case, Solito is just an RN app, so if it works (or doesn’t) with RN, then the same will happen in Solito
from solito.
Where do you see it’s supported by RN? That issue doesn’t say it is
It turns out I missread the last commit:
ZaBursta pushed a commit to ZaBursta/protobuf.js that referenced this issue on May 17, 2018
Only 1 string literal per require …
React native does not allow dynamic string imports the way node does. Neither does frontend in general.
I see, so when it works on my next app, its only working cause its running on the server? Whereas it wouldn't work in normal React or RN?
How could I work around it?
from solito.
What is the use case for this on the frontend for you? You could make a server endpoint that returns JSON if you want, or you’d have to make a list importing all possible files
from solito.
What is the use case for this on the frontend for you? You could make a server endpoint that returns JSON if you want, or you’d have to make a list importing all possible files
For RN, we would want offline functionality as our data doesn't really change. So the JSON files are bundled with the app.
from solito.
In that case, you can simply import every json file and put them in an array or dictionary with keys and then pick from there
from solito.
I see, thank you, I appreciate it!
from solito.
Related Issues (20)
- Can't use react-native-reanimated with Expo Router Starter HOT 5
- How to deploy solito monorepo to vercel HOT 4
- target blank is not propagated to next/link HOT 3
- [EXPO SDK 50] [expo-head] Error: generic class 'Field' requires that 'Date' conform to 'AnyArgument' HOT 3
- Excessive question mark using `useUpdateSearchParams` HOT 1
- installing with expo v47
- passing Omit<ComponentProps<typeof TextLink>, 'className'> to <TextLink> results in an error HOT 2
- Uncaught Error: Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering. HOT 1
- Add Search Options to Docs HOT 2
- Image for native not shown when using SolitoImage with source from expo-image-picker (web works fine) ; ImageBackground query and Nextjs issue (Image... has either width or height modified, but not the other ) HOT 4
- MotiLink not working with App Router HOT 3
- Rewriting the url using the `as` parameter clears params on native. HOT 5
- `useUpdateSearchParams` does not work with the react native app HOT 1
- `usePathname` does not work with react native app HOT 1
- onLoadingComplete deprecation notice HOT 3
- `useSearchParams` crashing on react native app HOT 2
- Link / push change URL+ execute getServerSideProps, but "setParams" (createParam) change URL but no getServerSideProps HOT 2
- Tanstack Router Support
- Add Support for Vike
- Fix fetchPriority name for React HOT 1
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 solito.