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

Content should be a @State variable #5

Closed
L1cardo opened this issue Sep 6, 2020 · 4 comments
Closed

Content should be a @State variable #5

L1cardo opened this issue Sep 6, 2020 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@L1cardo
Copy link
Contributor

L1cardo commented Sep 6, 2020

The content should be a @State variable, and then we can use it like this.

@State private var json = ""
	
var body: some View {
	CodeViewer(content: $json)
	.onAppear {
		json = """
		{
			"text": "hello world"
		}
		"""
	}
}
@phucledien
Copy link
Member

ok, that sounds cool. Feel free to implement it if you have time @L1cardo 👍

@phucledien phucledien added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Sep 7, 2020
@L1cardo
Copy link
Contributor Author

L1cardo commented Sep 7, 2020

ok, that sounds cool. Feel free to implement it if you have time @L1cardo 👍

I really want to implement it, but I need to prepare for my exam.
Can you do that in your spare time?

@phucledien
Copy link
Member

ok, that sounds cool. Feel free to implement it if you have time @L1cardo 👍

I really want to implement it, but I need to prepare for my exam.
Can you do that in your spare time?

Haha, okay then. Good luck with your exam 💯

@phucledien
Copy link
Member

phucledien commented Sep 7, 2020

version 1.2.0 now supported @State 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants