Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hooks #1

Closed
8 of 9 tasks
voces opened this issue Oct 15, 2020 · 3 comments
Closed
8 of 9 tasks

Hooks #1

voces opened this issue Oct 15, 2020 · 3 comments

Comments

@voces
Copy link
Owner

voces commented Oct 15, 2020

  • useState
  • useReducer
  • useMemo
  • useCallback
  • useRef
  • useContext
  • useEffect
  • useLayoutEffect
  • useErrorBoundary
@RedLove
Copy link

RedLove commented Apr 16, 2022

Does useContext/useLayoutEffect/useErrorBoundary done?
It help me a lot, but havn't useContext/useLayoutEffect/useErrorBoundary hooks.

@voces
Copy link
Owner Author

voces commented Aug 24, 2022

@RedLove I've recently picked this project back up and have implemented all hooks as of 4.4.0 except useLayoutEffect.

I'm curious about your use case for useLayoutEffect. basic-pragma is a bit more simplified than React/Preact in how useEffect is implemented, with the callback being invoked synchronously in the render function. useLayoutEffect is traditionally invoked between DOM attribute changes and screen paints, but those steps are combined in basic-pragma as the adapter's createFrame/updateFrameProperties callbacks.

@voces voces closed this as completed Sep 26, 2022
@RedLove
Copy link

RedLove commented Mar 19, 2023

I implemented the same functionality using another approach, but your solution looks much simpler, more elegant, and better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants