Pier Paolo Ramon

Results 62 comments of Pier Paolo Ramon

The issue is that `get/set` shorthands represent at the same time a property and function (each). So every function decorator must include something in the form of: ``` js function...

An (after)thought: a simple, unobtrusive flag could do the job **but** would bring confusion over the usage of decorators. ``` js function Decorator(target, name, descriptor, type) { // type here...

Please also have a look at https://github.com/yuchi/java-npm-semver which passes the full npm’s semver test suite (as of 2017!)

Thanks for following up! In your solution you use a *Effect* while refs are updated even before the execution of *LayoutEffect*, i suggest to move to `useLayoutEffect`. ***But*** even with...

I have no idea about SSR. Currently there’s no way to attach an effect or a callback of some sort before other layout effects are run (only the actual order...

MUI's version is stable, but only in a single specific sense, and formally fragile. Let me explain. A perfect _ref merger_ should: 1. **Be stable against re-renders**, if no input...

Again, I feel like this cannot be solved in user space.

@agriffis I was thinking about it too, but I’m still trying to come up with a case where a ref is called again with the same value. If we find...

@agriffis This is a very elegant solution with a major drawback… Please don’t hate me. ```js function MyComponent() { const [rerender, setRerender] = React.useState(false); const ref = React.useRef(null); React.useLayoutEffect(() =>...

What scares me is the terribly subtlety of the semantic differences. So, somehow, I prefer a more raw approach of simply updating the ref every time a ref changes, and...