You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently state is provided/injected via a named object quizForge. To simplify the code, be consistent in use of the composition API, and improve how the module's exports work with tooling, we should instead use the composition API's provide/inject functionality. See useSeach for a similar use case represented.
Acceptance Criteria
Remove all references to quizForge
All values that are returned in the exported function in useQuizCreation.js should be providedin addition to being returned. This should result in our being able to instantiate a single shared instance of the module by way of...
A function similar to the useSearch.js#injectSearch() (eg, injectQuizCreation) function can be used to inject the provided values wherever we would like. It should just create the injected objects and return them.
All instances where quizForge was injected should now have injectQuizCreation called and all used properties of it destructured from the call to your new function.
For example, if you only use the updateSection method you'd say: const { updateSection } = injectQuizCreation() -- and then return that updateSection variable from within setup().
Tests should pass largely as-is for the useQuizCreation, although some changes might be required to accommodate the updates with injection
The text was updated successfully, but these errors were encountered:
Observed behavior
Currently state is provided/injected via a named object
quizForge
. To simplify the code, be consistent in use of the composition API, and improve how the module's exports work with tooling, we should instead use the composition API'sprovide/inject
functionality. SeeuseSeach
for a similar use case represented.Acceptance Criteria
quizForge
useQuizCreation.js
should beprovided
in addition to being returned. This should result in our being able to instantiate a single shared instance of the module by way of...useSearch.js#injectSearch()
(eg,injectQuizCreation
) function can be used to inject the provided values wherever we would like. It should just create the injected objects and return them.quizForge
was injected should now haveinjectQuizCreation
called and all used properties of it destructured from the call to your new function.For example, if you only use the
updateSection
method you'd say:const { updateSection } = injectQuizCreation()
-- and then return thatupdateSection
variable from withinsetup()
.The text was updated successfully, but these errors were encountered: