epicweb-dev / epicshop

The workshop app for all workshops on EpicWeb.dev
https://www.epicweb.dev
Other
207 stars 33 forks source link

loader function calls getApps three time #41

Closed onemen closed 1 year ago

onemen commented 1 year ago

$exerciseNumber_.$stepNumber.$type.tsx loader function calls getApps three time

https://github.com/epicweb-dev/kcdshop/blob/8f1503545f9c2d72f552c2cfaeb179d13fc0ef5e/packages/workshop-app/app/routes/_app%2B/_exercises%2B/%24exerciseNumber_.%24stepNumber.%24type.tsx#L112

would it be simpler to call getPlaygroundApp directly

https://github.com/epicweb-dev/kcdshop/blob/8f1503545f9c2d72f552c2cfaeb179d13fc0ef5e/packages/workshop-app/app/routes/_app%2B/_exercises%2B/%24exerciseNumber_.%24stepNumber.%24type.tsx#L136

https://github.com/epicweb-dev/kcdshop/blob/8f1503545f9c2d72f552c2cfaeb179d13fc0ef5e/packages/workshop-app/app/routes/_app%2B/_exercises%2B/%24exerciseNumber_.%24stepNumber.%24type.tsx#L167

@kentcdodds, I can post a PR if it is something you want to fix

kentcdodds commented 1 year ago

A PR would be nice, but I have to see it before I can decide whether I want to merge it.

onemen commented 1 year ago

Why did you wrapped getPlaygroundApp inside getApps? during /set-playground action thare are multiple calls to getApps that trigger getFreshValue for getApps and getPlaygroundApp.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.32.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: