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
I just disabled the rule in my project but I don't fully understand the implications of doing so, so if someone knows a way to fix this in the example I think that'd be great given that this is now a recommended rule.
The text was updated successfully, but these errors were encountered:
Well, the following variant would work correctly without breaking this rule, and its much clearer anyway:
exportdefaultasynccontext=>{const{
app,
router,
store,}=awaitcreateApp();router.push(prepareUrlForRouting(context.url));returnnewPromise((resolve,reject)=>{router.onReady(()=>{context.rendered=()=>{// After all preFetch hooks are resolved, our store is now// filled with the state needed to render the app.// When we attach the state to the context, and the `template` option// is used for the renderer, the state will automatically be// serialized and injected into the HTML as `window.__INITIAL_STATE__`.context.state=store.state;};resolve(app);},reject);});}
The rule
no-async-promise-executor
seems to be set in the recommended group in new versions of ESLint. This trips the following code in the example:entry-server.js
I just disabled the rule in my project but I don't fully understand the implications of doing so, so if someone knows a way to fix this in the example I think that'd be great given that this is now a recommended rule.
The text was updated successfully, but these errors were encountered: