Giter Site home page Giter Site logo

Comments (10)

lucasferreira avatar lucasferreira commented on August 16, 2024 15

Hi @ucallQA and @lisa-nguyen-goldenowl

As we could see in https://github.com/react-native-community/react-native-modal README:

"Since react-native-modal is an extension of the original react native modal, it works in a similar fashion react-native original modal."

The original react native modal it's a "100% native solution" it works in another UI thread inside the app like a portal, só it runs always above everything in your app.

The only solution we had in this case it's described here: #1 (comment)

Basically you will need to put a second instance of <FlashMessage /> component inside your modals and call the show message by the ref, ex: this.refs.mySecondFlashMessage.showMessage({ ... })

from react-native-flash-message.

ucallQA avatar ucallQA commented on August 16, 2024 5

I actually double checked if we were using a built in modal and we are using this library

https://github.com/react-native-community/react-native-modal

I think there might be a priority issue with this library, is there some way I can prioritize the react-native-flash-message over this one? I use the modal nested deep within one of my react components while the react-native-flash-message is initialized and called within the root/first layer of the project so I would imagine it would take priority.

Unless I'm misunderstanding the issue and it's related to react-navigation (we're on a much older version of it, this might be why it's acting weird)

from react-native-flash-message.

GustavoBonfimS avatar GustavoBonfimS commented on August 16, 2024 4

I had this problem and found this solution in the official examples. maybe it helps too

https://github.dev/lucasferreira/react-native-flash-message/tree/master/examples/FlashMessagePlayground

from react-native-flash-message.

lucasferreira avatar lucasferreira commented on August 16, 2024 1

Hi @ucallQA

I've made a small sample at expo using react-navigation and Modals:

https://snack.expo.io/SJ7LNmIKB

As you can see when you click "Go to logout screen" a new screen are open in modal way, and the flash message keeps working.

If your setup it's different from my sample, please let me know and send me more code or prints.

from react-native-flash-message.

lisa-nguyen-goldenowl avatar lisa-nguyen-goldenowl commented on August 16, 2024 1

It worked like a charm!!! Thanks, @lucasferreira!

from react-native-flash-message.

sam9010 avatar sam9010 commented on August 16, 2024 1

@GustavoBonfimS https://github.dev/lucasferreira/react-native-flash-message/tree/master/examples/FlashMessagePlayground/components/CustomModal was useful for me... tnx

from react-native-flash-message.

lucasferreira avatar lucasferreira commented on August 16, 2024

Hi @ucallQA

What kind of navigation lib are you using?

from react-native-flash-message.

ucallQA avatar ucallQA commented on August 16, 2024

Hi @lucasferreira ,
Currently we are using react-navigation although it is not the latest version, maybe that's why?

from react-native-flash-message.

lisa-nguyen-goldenowl avatar lisa-nguyen-goldenowl commented on August 16, 2024

I have the same problem as @ucallQA

from react-native-flash-message.

lucasferreira avatar lucasferreira commented on August 16, 2024

You're welcome @lisa-nguyen-goldenowl ;)

from react-native-flash-message.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.