Code Monkey home page Code Monkey logo

Comments (3)

zboldyga avatar zboldyga commented on May 26, 2024

On another note, same function - I see why you've called ruleTracker from the onChange handler. It seems like a valid way to track whether the Mozilla Form has changed state (and it's own props), and they seem to specifically outline this in their documentation. e.g.

'WARNING: If you have situations where your parent component can re-render, make sure you listen to the onChange event and update the data you pass to the formData attribute.'

I'm fairly new to React, but it seems like the React documentation tries to encourage us to handle these types of updates from the built-in pre-render handlers. Interested to hear ur thoughts.

from react-jsonschema-form-conditionals.

mavarazy avatar mavarazy commented on May 26, 2024

I've optimized rendering by playing with shouldComponentUpdate, which is triggered in 3 cases

  1. Schema changed
  2. uiSchema changed
  3. external properties changed

from react-jsonschema-form-conditionals.

mavarazy avatar mavarazy commented on May 26, 2024

The only drawback I see with this is that currently all actions are limited to schema and uiSchema and we should be extra careful if we decide to extend this beyond this scope

from react-jsonschema-form-conditionals.

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.