Giter VIP home page Giter VIP logo

Comments (4)

customcommander avatar customcommander commented on August 16, 2024 3

Since this method (createFactory) has been deprecated in React 16.x, is it possible that this project will stop working when/if a future release of React drops support for it?

from recompose.

bigtone1284 avatar bigtone1284 commented on August 16, 2024 2

Is this fixed?

from recompose.

boatcoder avatar boatcoder commented on August 16, 2024

Was looking to see how hard this would be an it does look a bit daunting! createFactory returns a function that creates an element and createElement returns an element. Looks like the library is using createFactory to defer the mapping of props.

I wonder if it would make sense to bring the createFactory logic into this library and have it use createElement, that means the warning would go away, but if createFactory is relying on internals..... (which it isn't)

createFactory

/**
 * Return a function that produces ReactElements of a given type.
 * See https://reactjs.org/docs/react-api.html#createfactory
 */
export function createFactory(type) {
  const factory = createElement.bind(null, type);
  // Expose the type on the factory and the prototype so that it can be
  // easily accessed on elements. E.g. `<Foo />.type === Foo`.
  // This should not be named `constructor` since this may not be the function
  // that created the element, and it may not even be a constructor.
  // Legacy hook: remove it
  factory.type = type;
  return factory;
}

Not really sure WHY they are dropping support for createFactory if createElement is going to continue to exist....

from recompose.

dominicfraser avatar dominicfraser commented on August 16, 2024

Now that our projects have moved to React 17 we are now also seeing this warning from another npm package we use that itself uses recompose. Our assumption is that in React 18 it will become breaking.

from recompose.

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.