Comments (15)
@devpascoe gotcha. We're a bit off in developing this, we'll have a new @giphy/react-native-components
library and everything. Excited to work on it though, hopefully soon 🤞
from giphy-js.
Has anyone had any luck getting @giphy/js-fetch-api
working in React Native?
I'm getting the error "Can't find variable: location" and not having much luck trying to figure out how to fix it.
from giphy-js.
Thanks @devpascoe ! When you say working again, what do you mean is working?
from giphy-js.
Working as in the Xcode project will build again.
from giphy-js.
Fun! Getting by with using your urls directly for now. 👍
from giphy-js.
Facing the same issue with Android app as well.
from giphy-js.
@banatiarpit97 don't forget we do have native SDKs: https://developers.giphy.com/docs/sdk#android React Native SDK isn't currently being worked on, but it is on the roadmap
from giphy-js.
Yes, I know about the Android SDK but integrative native SDK on a react native app would be a tedious task for me. Directly hitting Giphy URLs seems an easier option right now.
Anyways, excited to see a React Native SDK in future.
from giphy-js.
@destinybonavita can you see where location
is being referenced? There isn't anything in the giphy/js repo that looks problematic to me. It could be a dependency though
from giphy-js.
@giannif I didn't see anything in the repo that could of been causing it. I searched my entire repo, node_modules
included, for location
but couldn't find anything. I eventually just decided to use the REST API.
from giphy-js.
@destinybonavita thanks for giving it a shot. React Native support is on our roadmap. Stay tuned
from giphy-js.
I've just worked on giphy picker for a react native project and to make this library work with it I needed to edit these files:
get-pingback-id.js
injs-utils
- react native doesn't havesessionStorage
so as a workaround you can just check if the sessionStorage exists and if it doesn't generate newpingbackId
without saving itlog.js
injs-utils
- to enable theLogger
it useslocation
which is not available in react native so as a solution you need to add an additional checktypeof location !== 'undefined'
from giphy-js.
@szymonograbek thanks for digging in here, I'm going to make the changes and do a release. Confused though about what I can do for sessionStorage
, is there an error thrown? It looks like everything is a in a try catch and pingback id should still be stored in memory
from giphy-js.
@giannif Oh, that's true, I didn't notice the try/catch block. The change with checking if sessionStorage
exists is not needed. Since yesterday I came across another issue and you need to follow this https://github.com/uuidjs/uuid#getrandomvalues-not-supported as getRandomValues
in uuid
is not supported in react-native
from giphy-js.
Good news everyone, we have an official React Native SDK coming soon. If you'd like to request access to the limited beta, email [email protected] and include your github user name
from giphy-js.
Related Issues (20)
- How to pick the format having only the id? HOT 3
- Gif does not support keypress event HOT 3
- At Grid component: "Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method." HOT 1
- Add support for AbortController HOT 1
- Consider making pingback and remote fonts configurable HOT 4
- Why there is no 'clips' type? HOT 1
- Carousel does not pass noLink property HOT 1
- Giphy React Grid component is not working HOT 4
- Please upgrade to react18 HOT 5
- SearchBar component make search button optional HOT 2
- Giphy/react-components 5.13.0 corporate proxy issue HOT 1
- renderGrid gifs positions are not set properly in lit HOT 2
- Focused Gif is not visually emphasized HOT 4
- Remove Grid not working HOT 1
- `require` in ESM build HOT 2
- `SyntaxError: Named export 'appendGiphySDKRequestHeader' not found. The requested module '@giphy/js-util' is a CommonJS module, which may not support all module.exports as named exports.` HOT 2
- It is advised to avoid ship styled-components in the build bundle. HOT 5
- React logging errors similar to "React does not recognize the `isFirstLoad` prop on a DOM element." HOT 1
- Next.js build fails: "Module not found: Can't resolve 'styled-components'" HOT 2
- Security concern: qs vulnerable to Prototype Pollution
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 giphy-js.