Giter VIP home page Giter VIP logo

react-deep-force-update's People

Contributors

bfiss avatar gaearon avatar gregberge 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

react-deep-force-update's Issues

possible packaging issues: .babelrc causes react-native not to work

Hello, I am having problems using react-native 0.21
According to this report
facebook/react-native#5393 (comment)
it has to do with .babelrc being included in your distribution of npm.

I am not actually sure if that's the problem, or not. The solution to remove all the .babelrc from my node_modules directory does not appear to fix anything.

Therefore, I wanted to reach out to you to see if you could take a look.

my package.json does not even include deep-force-update

"engines": {
"node": ">=4",
"npm": ">=2 <4"

},

"devDependencies": {

"babel-core": "^6.6.5",
"babel-register":"^6.6.0",
"babel-eslint": "^5.0.0",
"babel-loader": "^6.2.0",
"babel-preset-react-native": "^1.5.1",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-1": "^6.5.0",
"eslint": "^2.2.0",
"eslint-loader": "^1.1.1",
"eslint-plugin-react": "^4.0.0",
"react-native-webpack-server": "^0.8.4",
"webpack": "^1.12.14",
"webpack-dev-server": "^1.14.1"
},

"dependencies": {

"react-native": "^0.21.0",

"@remobile/react-native-splashscreen": "^1.0.3",

"react-native-blur": "^0.7.10",
"react-native-htmlview": "^0.2.0",

"react-native-material-kit": "^0.3.0",
"react-native-material-design": "^0.3.3"
}
react-proxy-erorr

Update only elements that subscribe to given contextType

I use this to update components that use context to get translation strings after the language was switched.

I know this uses internal APIs, but using this is much nicer than either constantly managing 100+ listeners or force-rerendering the app through a key on the root element.

It would be even nicer if it would only update components that use the context in the first place. Would that be difficult to do? Would you accept a PR that does this?

Integration with react-native-navigation

Hello,

Is anyone here can help me to integrate this tool (v1.x) with wix react-native-navigation library which builds its component stack a bit differently ?

Thanks

Npm install package error?

Hi,

It seems there is an issue with the package.

npm install gaearon/react-deep-force-update doen't add the lib.

I needed to clone it to be able to add the sources.

Have a good day
Dorian

node.tag is never 2 for React v16.6 => never updates

This pertains to v4 beta 13, which code is not to be found in this repo :(

the beta checks node.tag and only processes nodes where node.tag === 2. However, in React v16.6 it seems that almost all nodes are a 1.

Hence, no updates.

Using react-redux connect deep force update does not work

forceUpdate is ignored by react-redux connect. Because internally a renderedElementis stored and forceUpdate does not reset this element, leading to rendering an possibly 'old' component. A fix could be like adding this code to deepForceUpdate. Or update react redux connect to handle forceUpdate.

    traverseRenderedChildren(node, internalInstance => {
        const instance = internalInstance._instance;
        if (instance && instance.renderedElement) {
            instance.renderedElement = null;
        }
    });

Don't expose internal info

Looking at #6 again, I understand now that onUpdate and shouldUpdate "leak" internal instances to the user code. Can we please avoid this? Let's change the code to take the limited amount of information you need (e.g. an object containing the fields you're interested in). We can add more fields but I don't want to make internal structure exposed.

@bfiss Could you please change this?

Test doesn't run for Fiber?

I'm not entirely sure, but I think CI runs don't test all the Fiber code. It's very important to also test that code :)

Don't work with react-native 0.64.2

Hi, I updated my app to react-native 0.64.2 from 0.63.x and your package don't work on ios release mode.

I have this error in xcode logs :

[javascript] TypeError: undefined is not an object (evaluating ‘f.tag’)
This error is located at:
  in l
  in Connect(l)
  in f
  in Unknown

After some investigations, I use redux-i18n that is using react-deep-force-update

The problem is in :

  var root = instance._reactInternalFiber || instance._reactInternalInstance;
  if (typeof root.tag !== 'number') {
    // Traverse stack-based React tree.
    return deepForceUpdateStack(instance, shouldUpdate, onUpdate);
  }

root is undefined and can't find tag property.

thx
Jeremie.

How does it work with React Native?

I saw the README mentions that it works on React Native but doesn't explain how as we don't have instance of rendered tree as we do with react-dom. Can somebody please point me out on how we get react tree instance? Thanks

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.