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

default to accessors: false #2242

Merged
merged 1 commit into from
Mar 17, 2019
Merged

default to accessors: false #2242

merged 1 commit into from
Mar 17, 2019

Conversation

Rich-Harris
Copy link
Member

Implements the accessors option as described in #2144 and sets the default to false. It makes me a tiny bit nervous that the default is to have such different behaviour for export let and export function, partly because it'll be a challenge to document, but it does seem weird if the default behaviour is to bloat up people's bundles.

@Conduitry
Copy link
Member

What's the interaction between the accessors compiler option and the component option with this?

@codecov-io
Copy link

codecov-io commented Mar 17, 2019

Codecov Report

Merging #2242 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2242   +/-   ##
=======================================
  Coverage   91.83%   91.83%           
=======================================
  Files           1        1           
  Lines          49       49           
=======================================
  Hits           45       45           
  Misses          4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 362e186...83a9b6a. Read the comment docs.

@Rich-Harris
Copy link
Member Author

Component options override compiler options (which default to false normally but true for custom elements where it's generally necessary)

@Conduitry
Copy link
Member

And also I guess do we want to expose flush in some way if no accessors becomes the default? We're losing the ability to synchronously update a component.

@Rich-Harris
Copy link
Member Author

Is there a situation where it's necessary to update a component synchronously (as opposed to $set(...) followed by await tick(), which has the same result as far as the user is concerned)? I'm inclined to file it under YAGNI until proven otherwise

@Conduitry
Copy link
Member

I'm fine with YAGNIing it, just wanted to mention it. 👍

@Rich-Harris Rich-Harris merged commit f6607be into master Mar 17, 2019
@Rich-Harris Rich-Harris deleted the gh-2144 branch March 17, 2019 15:46
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.

3 participants