Skip to content

Chore: always use config ref #1397

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

Merged
merged 3 commits into from
Sep 1, 2021
Merged

Chore: always use config ref #1397

merged 3 commits into from
Sep 1, 2021

Conversation

huozhi
Copy link
Member

@huozhi huozhi commented Aug 28, 2021

  • use config ref in execute function
  • shorten generated code (8016 -> 8582)

@huozhi huozhi requested a review from shuding as a code owner August 28, 2021 16:59
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4e22eb2:

Sandbox Source
SWR-Basic Configuration
SWR-States Configuration
SWR-Infinite Configuration
SWR-SSR Configuration

@shuding shuding changed the title chore: always use config ref and shotern code Chore: always use config ref Aug 28, 2021
@shuding
Copy link
Member

shuding commented Aug 28, 2021

This seems like a good idea! Unrelated: I think we should make clear about when to use the latest config and when use the snapshot.

@huozhi
Copy link
Member Author

huozhi commented Aug 28, 2021

Like use ref for function calls and config for some primitive values?

@shuding
Copy link
Member

shuding commented Aug 29, 2021

I meant when to use configRef.current.a and when to use config.a. Most of the options should be good to use the latest value, but for some we need to use the snapshot for correctness.

@shuding shuding merged commit 3285cc4 into master Sep 1, 2021
@shuding shuding deleted the shorten branch September 1, 2021 18:19
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