-
Notifications
You must be signed in to change notification settings - Fork 111
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
chore: fix preact usages across application #972
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Skaiir Kudos for this, I've been wanting to do this for some time 🚀
I have some minor comments
packages/form-js-editor/src/features/render-injection/slot-fill/SlotFillRoot.js
Outdated
Show resolved
Hide resolved
packages/form-js-viewer/src/render/hooks/useCleanupMultiSelectValues.js
Outdated
Show resolved
Hide resolved
Related to hto#444
Related to hto#444
Related to hto#444
704b5b7
to
293a941
Compare
@@ -4,10 +4,10 @@ import { | |||
} from 'preact/hooks'; | |||
|
|||
|
|||
export default function usePrevious(value) { | |||
const ref = useRef(); | |||
export default function usePrevious(value, defaultValue = null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of unrelated, but I think the implementation of this component is wrong, no?
It's not a reactive hook, here's a correct implementation of one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's probably doing more re-renders than necessary. I'll send a PR later to fix.
Related to https://github.com/camunda/team-hto/issues/444
This is only the first part of the changes. There's one big misuse left but it's super core and might take a bit for me to diagnose completely. But I've reduced down the warnings from 35ish to 1 which is progress.
I've still got another part of this on a local branch which is to merge the properties panel render tree with that of the rest of the editor, but still need a little bit of debugging for that one. Won't be long though. But let's merge as we go along.