mbasso / react-decoration

A collection of decorators for React Components
MIT License
631 stars 24 forks source link

Added @lock #13

Closed lake-effect closed 5 years ago

lake-effect commented 5 years ago

This is an implementation of a decorator slightly different from @debounce or @throttle: it disables the decorated event handler after the first time it is triggered. My team has found it useful for ensuring navigation events only trigger once, since navigation will destroy the decorated component after it completes. There's no issue for this but it's a feature we need.

The PR also removes trailing whitespace from lines and hard wraps documentation.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.02%) to 99.373% when pulling a7322bd66eaaffb6376e76cf3e864486904c8fed on lake-effect:master into d908916a529909cd5d882476c372d8b9329fc0ca on mbasso:master.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.02%) to 99.375% when pulling d68757560a10620307d663ac943b2517269a26c2 on lake-effect:master into d908916a529909cd5d882476c372d8b9329fc0ca on mbasso:master.

mbasso commented 5 years ago

Hi @lake-effect, thank you so much for opening this PR, cool! I'll review it in a couple of minutes and I'll be happy to merge ๐Ÿ˜„

lake-effect commented 5 years ago

@mbasso Is there anything else you think this PR needs?

mbasso commented 5 years ago

Iโ€™m sorry for my late reply but Iโ€™m a little bit busy in these days... Iโ€™ve just reviewed the new version, addressing only a little thing I havenโ€™t seen before. After that Iโ€™ll be really happy to merge and deploy ๐Ÿ™‚

lake-effect commented 5 years ago

No problem! I fixed the README.

lake-effect commented 5 years ago

Does the README look okay?

mbasso commented 5 years ago

It looks fine! I'll merge and publish a new release, thank you! ๐Ÿ˜„

mbasso commented 5 years ago

react-decoration@2.1.0 is online ๐ŸŽ‰ thank you ๐Ÿ˜„