Coder Social home page Coder Social logo

DevTools about react-recollect HOT 3 CLOSED

davidgilbertson avatar davidgilbertson commented on June 8, 2024
DevTools

from react-recollect.

Comments (3)

dijs avatar dijs commented on June 8, 2024

Ahhh, 🤦...

I just tried using regex in the console filter and it worked.

For those who find this and need it:

/UPDATE|SET/

Anyways, getting this sucker on the redux devtools would still be highly beneficial, so I won't close this issue just yet.

from react-recollect.

dijs avatar dijs commented on June 8, 2024

Well... That was super easy.

In any component you use collect on, you can import and add an inspector:

import { inspectProps } from 'react-inspect-props';
...


export default collect(inspectProps('Inspector')(Component));

Then just make sure you have the Google Chrome Redux DevTools installed.

from react-recollect.

davidgilbertson avatar davidgilbertson commented on June 8, 2024

Hey, react-inspect-props is great! Thanks for sharing, and thanks for offering to look into it.

In some circumstances, you also might find useful afterChange which would let you conditionally log updates to the console. For example:

import { afterChange } from 'react-recollect';

afterChange(props => {
  if (props.propPath.includes('products')) {
    props.components.forEach(component => {
      console.log(`Updated "${component._name}" because "${props.propPath}" changed`);
    });
  }
});

Or even use a live expression to watch something very specific, like __RR__.getStore().products.filter(product => product.favorite).length.

from react-recollect.

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.