- Ensure
renderOnWindowResize
will always rerender the component on window resize, even if the calculated values have not changed
- Add
renderOnWindowResize
option
- Fix convenience methods not supporting implementations both with and without options
- Add
Measured
component with render function support
-
measure
(as well as the newMeasured
component) are named imports (no default export is provided) -
All properties are now flattened by default (no
position
orsize
objects)- If you want to have the properties in a separate object, apply the
namespace
option measure.flatten
no longer exists
- If you want to have the properties in a separate object, apply the
-
inheritedMethods
is no longer an option- if you want to access methods of the original component, use the
originalComponent
property from theref
- if you want to access methods of the original component, use the
-
isPure
is no longer an option -
positionProp
andsizeProp
options have been replaced by thenamespace
option -
The CommonJS
require
now requires.default
require('remeasure').default
- You can also use the named imports, e.g.
require('remeasure').measure
- Add
flatten
method (convenience method for flat multi-key mapping) - Remove
lodash
dependency (~10% reduction in built size)
- Move
react
andreact-dom
topeerDependencies
- Add
isPure
option, which will ensurePureComponent
is used for the higher-order component - Validate
options
have correct types - Prevent
ref
from being assigned when a stateless functional component is passed
- Replace
element-resize-detector
with use ofResizeObserver
ponyfill
- Add
es
transpilation in publish, forpkg.module
- Higher-order component will extend
PureComponent
if the component being wrapped is also aPureComponent
(extendsComponent
in all other scenarios)
- Add
inheritedMethods
as an option for accessing instance methods inrefs
- Replace
setState
with custom method that assigns to instance value and callsforceUpdate
synchronously if mounted - Remove a lot of unnecessary
if (instance.element)
checks
- Replace
element-resize-event
withelement-resize-detector
for better stability and removal of listeners - Listeners are now removed when element no longer exists, and will only set the element when it has changed
- Remove
mounted
instance value in favor of just checking ifelement
exists
- Remove instance methods in favor of generic utilities
- Update to Webpack 2 for
dist
builds
- Remove moize dependency
- Add more descriptive
displayName
toMeasuredComponent
for DevTools
- Ensure component is mounted before attempting to update state
- Add convenience methods for
flatten
option - Refactor for far more functional approach and performance improvements
- Add
raf
as dependency for more robustrequestAnimationFrame
setup
- Major refactor to be more functional (same functionality, but due to scope of refactor there may be regressions)
- Substantial performance improvement
- Zero out measurements when element is null
- Add documentation site
- Add
flatten
option, to prevent grouping underposition
andsize
properties
- Add
debounce
option, to debounce recalculation on resize
- Update dependencies
- Add checks to see if element exists before attempting resize state assignment
- Optimizations
- Refactor of instantiation to only put keys listened for on state instead of all keys
- Update to es2015-loose preset for smaller filesize
- Fix shorthand key use for
position
andsize
to work with custompositionProp
andsizeProp
- Add ability to pass
options
object, allowing overrides of the following properties:positionProp
(defaults toposition
) = the name of the position prop injected into the componentrenderOnResize
(defaults totrue
) = whether or not to trigger a re-render when element resizessizeProp
(defaults tosize
) = the name of the size prop injected into the component
- Abstract requestAnimationFrame assignment to
setRaf
function called oncomponentDidMount
(for universal apps)
- Component now only updates when one of the requested keys updates (or if used in standard way, when any key updates)
- Add
naturalHeight
andnaturalWidth
propertiesimg
is the only element that supports this natively, for all other elements these values reflectscrollHeight
andscrollWidth
- Add
clientLeft
,clientTop
,scrollLeft
, andscrollTop
properties
- Small changes to README
- Initial release