Skip to content
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

@State property change ends with error #51

Open
shial4 opened this issue Jan 9, 2020 · 6 comments
Open

@State property change ends with error #51

shial4 opened this issue Jan 9, 2020 · 6 comments

Comments

@shial4
Copy link
Contributor

shial4 commented Jan 9, 2020

I have a
@State var alert: (header: String, message: String)? = nil
changing it's value do not remove view from DOM. Further more the call ends with error:
[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (handle, line 0)

The value is changed inside:

.onTapGesture {
       self.signIn()
}
@shial4
Copy link
Contributor Author

shial4 commented Jan 9, 2020

Can you point me where should I look? debug? Maybe I will be able to fix it myself and prepare PR with a fix. Thanks :)

@helje5
Copy link
Member

helje5 commented Jan 9, 2020

No logs emitted? I'd just step through the code to check how the error happens.

@shial4
Copy link
Contributor Author

shial4 commented Jan 9, 2020

The code is working. Is doing what it should. The value in swift changes.
Problem is (I guess due to the error) DOM isn't redrawn.

@helje5
Copy link
Member

helje5 commented Jan 9, 2020

Do you have a repo demonstrating the issue? If so I may or may not have a look at it.

@shial4
Copy link
Contributor Author

shial4 commented Jan 9, 2020

@helje5
Please look here
https://github.com/shial4/SWUI-NextUp

@shial4
Copy link
Contributor Author

shial4 commented Jan 9, 2020

This is the exact project I am using rn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants