-
Notifications
You must be signed in to change notification settings - Fork 648
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
Adding class
to a component that uses the <await>
tag throws an exception
#942
Comments
@NotJustClarkKent currently the |
We will also improve the error message in this case ASAP. |
Any idea when the |
Any workarounds? |
This is about to become a blocker for us now that we are nearing production. Is there any plan to address this in the short term ? I'm using a workaround, which has some issues, but gets part of the way there. ServerAwait.marko
|
I now have a much improved marko component for working around the inability to use the In the initial re-render on the client it preserves the server rendered html until the new promise created on the client is resolved. NOTE : I have left off error handling for clarity. IsomprphicAwait.marko
Usage : LoadAndShowData.marko
|
Looks like this is a duplicate of #675, lets track this over there. |
Bug Report
Marko Version: 4.7.0
Details
Adding
class
to a component that uses the<await>
tag throws an exception and breaks client side runtime within the development env (works with env set to production). This can be either single or multi-file within your project but using the Try Online runtime does not reproduce the problem. I also noticed the same behaviour when I had an emptycomponent.js
file for the same component. May or may not be related to #675.Expected Behavior
A class should be able to be declared for an async component without throwing errors.
Actual Behavior
An exception is thrown once a
class
is added to a component.Possible Fix
N/A - Just getting started with Marko so I don't have enough knowledge about the library to help yet.
Additional Info
Your Environment
Steps to Reproduce
class
to the same file and run the example, with or without any methods (fails ✘)Uncaught Error: Not allowed
Stack Trace
The text was updated successfully, but these errors were encountered: