flux icon indicating copy to clipboard operation
flux copied to clipboard

Dont use require('react/lib/*') in examples & docs

Open zpao opened this issue 12 years ago • 4 comments

These are internal and implementation details of how React builds for npm. We're going to deprecate them. merge is now simply Object.assign and copyProperties is a simple for in (and can be replaced with Object.assign)

zpao avatar Oct 10 '14 19:10 zpao

What's your position on this now, with the release of 0.12 with deprecation warnings for merge/copyProperties and the provision of Object.assign in react/lib? Is it okay for the examples to simply be updated to use react/lib/Object.assign instead, or will even that be very quickly moved out of React entirely?

justinwoo avatar Nov 03 '14 05:11 justinwoo

My understanding is that FB is working on exposing Object.assign in a way that can be shared across projects, not just within React. But we're not there yet. So I am thinking about using Sindre's npm module for Object.assign until then.

fisherwebdev avatar Nov 03 '14 10:11 fisherwebdev

Cool, I'll look into updating my PR sometime later. It'd also be nice if we could also get Invariant to be shared when things are being bundled up.

justinwoo avatar Nov 03 '14 15:11 justinwoo

Done: https://github.com/facebook/flux/pull/91

justinwoo avatar Nov 04 '14 01:11 justinwoo