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

Change delay to double microtask for prop updates #609

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JoviDeCroock
Copy link
Member

This changes the delay for property updates to be a double micro-task, we got a report that in examples like

const App = () => {
  const text = useSignal('')
  const style = useSignal('')

  const callback = (input) => {
    text.value = input.currentTarget.value
    if (text.value >= 5) { style.value = 'display:none;'}
  }

  return <input style={style} onInput={callback} value={text} />
}

In the above case the user would be able to type 6 characters while we have actually already made the input dissapear.

Copy link

changeset-bot bot commented Oct 8, 2024

⚠️ No Changeset found

Latest commit: 67ddd38

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Oct 8, 2024

Deploy Preview for preact-signals-demo ready!

Name Link
🔨 Latest commit 67ddd38
🔍 Latest deploy log https://app.netlify.com/sites/preact-signals-demo/deploys/67055454002d810008826ab4
😎 Deploy Preview https://deploy-preview-609--preact-signals-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Size Change: +316 B (+0.38%)

Total Size: 83.6 kB

Filename Size Change
docs/dist/assets/index.********.js 836 B +1 B (+0.12%)
docs/dist/assets/signals.module.********.js 2.16 kB +74 B (+3.55%)
packages/preact/dist/signals.js 1.46 kB +111 B (+8.21%) 🔍
packages/preact/dist/signals.mjs 1.43 kB +130 B (+9.98%) ⚠️
ℹ️ View Unchanged
Filename Size
docs/dist/assets/bench.********.js 1.59 kB
docs/dist/assets/client.********.js 46.3 kB
docs/dist/assets/jsxRuntime.module.********.js 284 B
docs/dist/assets/preact.module.********.js 4.03 kB
docs/dist/assets/signals-core.module.********.js 1.41 kB
docs/dist/assets/style.********.js 21 B
docs/dist/assets/style.********.css 1.24 kB
docs/dist/basic-********.js 243 B
docs/dist/demos-********.js 3.44 kB
docs/dist/nesting-********.js 1.13 kB
docs/dist/react-********.js 243 B
packages/core/dist/signals-core.js 1.45 kB
packages/core/dist/signals-core.mjs 1.47 kB
packages/react-transform/dist/signals-*********.js 5.03 kB
packages/react-transform/dist/signals-transform.mjs 4.27 kB
packages/react-transform/dist/signals-transform.umd.js 5.15 kB
packages/react/dist/signals.js 188 B
packages/react/dist/signals.mjs 150 B

compressed-size-action

@JoviDeCroock JoviDeCroock force-pushed the change-delay branch 3 times, most recently from b2f7456 to 67ddd38 Compare October 8, 2024 15:48
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.

1 participant