docs icon indicating copy to clipboard operation
docs copied to clipboard

`Inject()` 3rd argument default value is not `true`.

Open niceplugin opened this issue 3 years ago • 4 comments

Inject() 3rd argument default value is not true.

However, the API Docs type description says true.

This can be confusing for many novice developers.

I did not know if this guide document was described incorrectly or if it was an issue of vuejs core, so I wrote it here.

See also: Playground

niceplugin avatar Jun 28 '22 06:06 niceplugin

@niceplugin thank you for reporting this! This looks like a bug in Vue core rather than a documentation issue (the default value of the 3rd argument should be true by default). Would you mind opening an issue in https://github.com/vuejs/core/issues instead?

NataliaTepluhina avatar Jun 28 '22 10:06 NataliaTepluhina

Thank you, I will do that.

niceplugin avatar Jun 28 '22 12:06 niceplugin

@niceplugin thank you for reporting this! This looks like a bug in Vue core rather than a documentation issue (the default value of the 3rd argument should be true by default). Would you mind opening an issue in https://github.com/vuejs/core/issues instead?

I feel this is a ducumentation issue. see https://github.com/vuejs/core/issues/6194#issuecomment-1169433928

edison1105 avatar Jun 29 '22 10:06 edison1105

@edison1105 I still disagree with this being a documentation problem. I can see the source code but I believe from the UX point of view evaluating the default value as a factory would be better and this should be the default behavior. Please see https://github.com/vuejs/core/issues/6194#issuecomment-1169817540 for the context.

NataliaTepluhina avatar Jun 29 '22 10:06 NataliaTepluhina