Code Monkey home page Code Monkey logo

react-native-root-toast's People

Contributors

7kfpun avatar bradjones1 avatar cornejobarraza avatar cpunion avatar danielweinmann avatar emilyzfive avatar greedbell avatar hesowcharov avatar jaxgit avatar jb-gomez avatar jfeldstein avatar jqn avatar magicismight avatar maki3000 avatar mmomtchev avatar rajkissu avatar sandromachado avatar shynst avatar sunnylqm avatar vitalik7 avatar wallel avatar yuritoledo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-root-toast's Issues

Error on running jest tests

 /Users/user/dir/node_modules/static-container/StaticContainer.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import React, { Component, Children, PropTypes } from 'react';
                                                                                             ^^^^^^
    SyntaxError: Unexpected token import

      at transformAndBuildScript (node_modules/jest-runtime/build/transform.js:320:12)
      at Object.<anonymous> (node_modules/react-native-root-siblings/lib/AppRegistryInjection.js:3:22)
      at Object.<anonymous> (node_modules/react-native-root-siblings/lib/SiblingsManager.js:3:27)

I find this error to be invoked by using package react-native-root-siblings which in new release is using static-container package which is not transformed with babel.

Quick fix is to install older version of package
npm install [email protected]

Not work with react navigation

It used to work fine for NavigationExperimental, but it does not appear on react-navigation even if the visible prop is set to true

a little suggestion

follow the README.md ,I use the first method to run , when click the button, I see a Toast, but I Quick click the button , Toasts are overlapping more . I can use the js to stop repeat, but i wish you can stop this in your plug-in.

const thisToastOnShow = true; //use a var record the Toast state
if(thisToastOnShow){
return;
}else{
return new RootSiblings(<ToastContainer
{...options}
visible={true}
>
{message}
</ToastContainer>);
}

Feature Request: Can We Introduce OnPress() For Custom Buttons On The Toast?

First off, thanks for the great project + maintenance.

The project has a hideOnPress() property, therefore user can interact with the toast. Can we expose the OnPress() so that we can add button(s) on the toast?

Usage would be:

User enters some invalid info, then toast would be:

you entered invalid info.
button: Reset 
another button: Save Anyway

No works in modals.

In modals the toast appears in the modal back

Example

<Modal visible={true}>
  <Toast visible={true} />
</Modal>

Warning about View.propTypes logged to console.

According to the stacktrace it is on line 71 of ToastContainer.

Here's the raw stacktrace if that helps:

Warning: View.propTypes has been deprecated and will be removed in a future version of ReactNative. Use ViewPropTypes instead.

reactConsoleErrorHandler @ ExceptionsManager.js:71
printWarning @ warning.js:36
warning @ warning.js:60
get @ View.js:184
(anonymous) @ ToastContainer.js:71
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:126
_require @ require.js:110
(anonymous) @ Toast.js:9
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:126
_require @ require.js:110
(anonymous) @ index.js:1
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:126
_require @ require.js:110
(anonymous) @ showToast.js:7
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:126
_require @ require.js:110
(anonymous) @ auth.js:13
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:126
_require @ require.js:110
(anonymous) @ distributor.js:1
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:126
_require @ require.js:110
(anonymous) @ index.js:2
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:126
_require @ require.js:110
(anonymous) @ configureStore.js:9
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:126
_require @ require.js:110
(anonymous) @ main.js:6
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:126
_require @ require.js:110
(anonymous) @ index.ios.js:8
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:119
_require @ require.js:110
(anonymous) @ locale-sgzh.json:1
executeApplicationScript @ debuggerWorker.js:40
(anonymous) @ debuggerWorker.js:65
utils.js:240 [...effects] has been deprecated in favor of all([...effects]), please update your code 
log @ utils.js:240
(anonymous) @ utils.js:246
runEffect @ proc.js:434
next @ proc.js:316
proc @ proc.js:271
runSaga @ runSaga.js:59
exports.default @ configureStore.js:26
(anonymous) @ main.js:26
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:126
_require @ require.js:110
(anonymous) @ index.ios.js:8
loadModuleImplementation @ require.js:174
guardedLoadModule @ require.js:119
_require @ require.js:110
(anonymous) @ locale-sgzh.json:1
executeApplicationScript @ debuggerWorker.js:40
(anonymous) @ debuggerWorker.js:65

Toast message reappears

ANDROID

After a toast message is set and shown, if i press the home button to exit out and then go back to the app, the toast message reappears. Does this happen to anyone else?

It seems like componentWillUnmount never gets called.

Unexpected view type nested under text node

wechatimg104

I got this error on:

"react": "16.3.1",   
"react-native": "0.55.3",  
"react-native-root-toast": "^3.0.1",   

And i found the error code at:

react-native-root-toast/lib/ToastContainer.js

The "Text" node can not has another child node:

render(){
     ...
     <Text style={[
           styles.textStyle,
           props.textStyle,
           props.textColor && {color: props.textColor}
      ]}>
            {this.props.children}
    </Text>
    ...
}

When I change the "Text" node to "View", My App works.

    <View>
          {this.props.children}
    </View>

嵌入到Modal发现的问题

大概代码如下:
在render内:

<Modal
  animated={false}
  transparent={true}
  visible={this.state.modalVisible}>
  <Toast
    visible={this.state.visible}
    position={50}
    shadow={false}
    animation={false}
    hideOnPress={true}
    >This is a message</Toast>
</Modal>

1.隐藏Modal后出现错误
qq20160414-0 2x

2.Toasl在Modal中,未显示到最顶层,被Modal遮挡。
qq20160414-1 2x

React Native root siblings is missing

When installing this component, it appears that the peer dependency (React Native root siblings) isn't downloaded. I'm using RN 0.23.0... Any idea?

Change toast width?

Thanks for this project!

Is there a way to modify the toast to take up the full width of the screen and not just the content?

error in RN0.28

the error is: "Cannot read property 'visible' of undefined ", it doesn't work!

react-native-root-siblings Exporting local "_default", which is not declared.

/Users/dan/code/app/node_modules/react-native-root-siblings/index.js: /Users/dan/code/app/node_modules/react-native-root-siblings/index.js: Exporting local "_default", which is not declared. (This is an error on an internal node. Probably an internal error.)

Strange error since I do see the default export in the index.js files...

export default class {
  constructor(element, callback, store) {
    const id = uuid++;
    function update(element, callback, store) {
      triggers.forEach(function (trigger) {
        trigger(id, element, callback, store);
      });
    };

    function destroy (callback) {
      triggers.forEach(function (trigger) {
        trigger(id, null, callback);
      });
    };

    update(element, callback, store);
    this.update = update;
    this.destroy = destroy;
  }
}

This is only happening on my production builds.

Keyboard covers toast

When keyboard is up and toast position is bottom, it's covered by keyboard! Is it possible to come upon keyboard view?

why it requires "react-native-root-siblings"?

I like this pure javascript solution, however, why it requires "react-native-root-siblings"?
Furthermore, the "react-native-root-siblings" requires react-redux....
is this necessary?

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.