Comments (11)
In my case memoizing the Toast component worked.
I created a wrapper component like the following:
const CustomToast = React.memo(() => <Toast config={toastConfig} />)
And then used it in place of
<Toast config={toastConfig} />
from react-native-toast-message.
I also facing same issue, I have setup Toast in App.js file and using redux I'm showing toast in app. It's working fine as expected but only in one use-case it's not working fine. Facing issue only for android.
Use Case:
- I've facebook login implement with firebase and I'm using react-native-fbsdk-next dependency for it.
- when i press facebook login button it'll start to show my custom loading screen as animated view with position absolute.
- but somehow while i press fb login button, empty toast is appeared on the top of the screen(as you can see in video).
- also I verified that toast is not calling from redux side. then why should it appeared.
I can provide more details as per needed. thank you in advance.
Screen.Recording.2024-01-30.at.10.06.22.AM.1.mp4
from react-native-toast-message.
I'm facing the same problem. When requesting media rights, popped up. It turned out to be fixed only by changing the Toast type string. Was 'messenger' became 'messenger-asdfasdf'
from react-native-toast-message.
I had the same issue - I fixed by adding a check for text1
to my custom Toast component. If no text1 is set, return null:
const Toast = ({type, text1}: PropTypes) => {
const {backgroundColor, IconComponent} = toastTypes[type];
if (!text1) {
return null;
}
return (
<SafeAreaView edges={['top']} style={[styles.container]}>
...
</SafeAreaView>
);
};
from react-native-toast-message.
I am encountering the same issue as you @chetanbhadarka when I open a browser page from within the app. Did you end up finding any solution? I tried explicitly calling the hide method before I open the link but with no success
from react-native-toast-message.
I am encountering the same issue as you @chetanbhadarka when I open a browser page from within the app. Did you end up finding any solution? I tried explicitly calling the hide method before I open the link but with no success
@MilanBarande, Not yet brother.
from react-native-toast-message.
I have tweaked an ugly hack. Keeping a boolean in a context to conditionally render the RNToast component in my root component. When I need to open a browser link, I set this boolean to false. It's working, but I really don't like it, as I'm causing unnecessary re-rendering to my entire components tree...
@chetanbhadarka
from react-native-toast-message.
Facing the same problem in Expo 50, show up the Toast at top without calling it. Places i observed it shows up:
- Expo Debugger is open
- When requesting Device permissions
from react-native-toast-message.
@sainjay try a patch package
from react-native-toast-message.
@alainib Can you share the link for patch file too 😀
@sainjay try a patch package
from react-native-toast-message.
@alainib Can you share the link for patch file too 😀
@sainjay try a patch package
diff --git a/node_modules/react-native-toast-message/lib/src/hooks/useSlideAnimation.js b/node_modules/react-native-toast-message/lib/src/hooks/useSlideAnimation.js
index 33f0b87..97e2423 100644
--- a/node_modules/react-native-toast-message/lib/src/hooks/useSlideAnimation.js
+++ b/node_modules/react-native-toast-message/lib/src/hooks/useSlideAnimation.js
@@ -16,7 +16,7 @@ export function useSlideAnimation({ position, height, topOffset, bottomOffset, k
const animate = React.useCallback((toValue) => {
Animated.spring(animatedValue.current, {
toValue,
- useNativeDriver,
+ useNativeDriver: false,
friction: 8
}).start();
}, []);
from react-native-toast-message.
Related Issues (20)
- You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file HOT 2
- Toast isn't swipeable inside Modal if custom toast is used
- Unable to delay between two roasts. HOT 1
- How to override the default duration for the Toast at root level for all instances? HOT 1
- Toasts should not move. How to stop moving? HOT 6
- crash on android when Toast.show() HOT 1
- Feature: Enable Swipe with Customizable Position-Right/Left HOT 2
- Custom props do not work HOT 1
- Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format
- Dragging the message while its beeing auto closed recreates a non-closable toast message HOT 6
- Toast not showing values inputed
- Text truncated on toast notification HOT 7
- Using useEffect in config - Warning: Internal React error: Expected static flag was missing. Please notify the React team.
- Postion Bottom Issues, Swipeable type missing
- Set swipeable prop on Toast component HOT 2
- Option to Hide Toast on Navigate HOT 2
- text color not applying after updating some packages HOT 3
- KeyboardOffset applied when keyboard is not open HOT 1
- Position bottom issues
- Get visibility time inside Toast config for building Custom Layouts
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 react-native-toast-message.