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

chore: fix preact usages across application #972

Merged
merged 3 commits into from
Jan 11, 2024
Merged

Conversation

Skaiir
Copy link
Contributor

@Skaiir Skaiir commented Jan 9, 2024

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.

@Skaiir Skaiir requested a review from vsgoulart January 9, 2024 21:23
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Jan 9, 2024
Copy link
Contributor

@vsgoulart vsgoulart left a 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

@Skaiir Skaiir force-pushed the fix-form-reactivity branch from 704b5b7 to 293a941 Compare January 11, 2024 09:30
@Skaiir Skaiir requested a review from vsgoulart January 11, 2024 09:33
@@ -4,10 +4,10 @@ import {
} from 'preact/hooks';


export default function usePrevious(value) {
const ref = useRef();
export default function usePrevious(value, defaultValue = null) {
Copy link
Contributor

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

Copy link
Contributor Author

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.

@Skaiir Skaiir merged commit 29e266b into master Jan 11, 2024
11 of 13 checks passed
@Skaiir Skaiir deleted the fix-form-reactivity branch January 11, 2024 10:40
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jan 11, 2024
Skaiir added a commit that referenced this pull request Jan 11, 2024
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

Successfully merging this pull request may close these issues.

2 participants