Skip to content

Releases: mbasso/react-decoration

@lock decorator

Choose a tag to compare

@mbasso mbasso released this 21 Jun 08:44
096120f

This release contains 1 new useful decorator.

@lock

Executes the decorated function as soon as you call it for the first time, and then disables further execution (thanks to @lake-effect in #13)

Upgrade to React 16

Choose a tag to compare

@mbasso mbasso released this 29 Sep 13:46

react-decoration now supports React 16 🎉

Breaking changes

Performance Measurement Decorators

Choose a tag to compare

@mbasso mbasso released this 06 Nov 19:17

This release contains 4 new useful decorators to debug and measure performance.

@trace

Outputs a stack trace to the Web Console

@time(label: string)

Tracks how long the decorated function takes, logging it in the Web Console. Here is an example in Google Chrome:

time

@measure(callback: function = console.log)

Gets information like time and memory usage before and after the execution of the decorated function and makes a comparison.
You can use this decorator to detect, for example, an excessive memory usage caused by the continuous creation of nested functions. For example arrow functions in render method.
Here is an example object that represents this:

measure

@perf(options: Object)

Uses Performance Tools to measure components performance so that you can identify perf issues like bottlenecks.
Here is an example of @perf applied to an App component, that render another React component called Input

perf

Debounce and Throttle

Choose a tag to compare

@mbasso mbasso released this 24 Oct 18:33

Add handleRenderError

Choose a tag to compare

@mbasso mbasso released this 13 Oct 18:45

Add @handleRenderError. Useful decorator to suppress Components errors and show a message instead of failing to render the whole app.

Add decorators

Choose a tag to compare

@mbasso mbasso released this 09 Oct 14:46

6 new decorators are included in this release:

Initial release

Choose a tag to compare

@mbasso mbasso released this 09 Oct 14:43
1.0.0