Skip to content

Conversation

Copy link

Copilot AI commented Nov 8, 2025

Added documentation for the trigger() function that was introduced in the PR but not documented in the README.

Changes

  • Added "Manual Triggering" section to README after "Effect Scope"
  • Documented basic usage: manually triggering updates after direct mutations
  • Documented multi-signal triggering pattern

Example

import { signal, computed, trigger } from 'alien-signals';

const arr = signal<number[]>([]);
const length = computed(() => arr().length);

// Direct mutation doesn't automatically trigger updates
arr().push(1);
console.log(length()); // Still 0

// Manually trigger updates
trigger(arr);
console.log(length()); // 1

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add trigger function to support manual dependency updates docs: add trigger() function documentation to README Nov 8, 2025
Copilot AI requested a review from johnsoncodehk November 8, 2025 10:52
Copilot finished work on behalf of johnsoncodehk November 8, 2025 10:52
@johnsoncodehk johnsoncodehk marked this pull request as ready for review November 8, 2025 10:55
@johnsoncodehk johnsoncodehk merged commit 28fef14 into api-trigger Nov 8, 2025
3 checks passed
@johnsoncodehk johnsoncodehk deleted the copilot/sub-pr-91 branch November 10, 2025 10:39
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