鈿笍 Enhancement
鈿笍 Bug
鈿笍 Question
鈿笍 Documentation gap/issue
N/A
It would be really nice to support React webhooks with pnpjs. Like e.g. @apollo/react-hooks.
This would make it much smoother to use pnpjs with stateless components in React.
Good idea? Stupid? Thoughts?
I would need much more detail on what you are asking to consider it. Why? What are the benefits? What do we need to do? Why just specific support for react and not any of the other 1000 frameworks? What changes are required in the library to support this? What happens when there is a newer cooler thing - would we have to retool to support that? Not against it, just lots of questions and you haven't provided any details in the request.
Just wondering. How React hooks correlate with PnPjs? And how the potential implementation is different from generic usage of useEffect & useState hooks with the library calls?
I am confused too.
I use PnPjs v2 with React hooks (I assume that's what you mean, not webhooks). These are two separate libraries and you can install both in your solution. If you use a recent SPFx version with React you should even get the hooks included by default.
[edit] I checked out @apollo/react-hooks and I understand that's a UI solution. In that context hooks make sense. The purpose of PnPjs is to consume REST APIs, not to deal with the UI.
@patrick-rodgers side note, privileging React over other frameworks makes sense as it has become Microsoft's library of choice. For example UI Fabric is now built on React by default while the plain js version has been deprecated.
I would need much more detail on what you are asking to consider it. Why? What are the benefits? What do we need to do? Why just specific support for react and not any of the other 1000 frameworks? What changes are required in the library to support this? What happens when there is a newer cooler thing - would we have to retool to support that? Not against it, just lots of questions and you haven't provided any details in the request.
You麓re right. After thinking it麓s through, this doesn麓t really make sense. Excuse my moment of weak thinking 馃摝
@olemp - always interested in ways we can make things better/easier for folks. Just need proposals like this to have sufficient detail so we can understand what is being asked/suggested. Keep the ideas coming!
@olemp - always interested in ways we can make things better/easier for folks. Just need proposals like this to have sufficient detail so we can understand what is being asked/suggested. Keep the ideas coming!
The right way is to put the pnpjs code in a function which can be used as react hook. Make no sense to implement anything in the pnpjs library!
Most helpful comment
@olemp - always interested in ways we can make things better/easier for folks. Just need proposals like this to have sufficient detail so we can understand what is being asked/suggested. Keep the ideas coming!