-
Notifications
You must be signed in to change notification settings - Fork 3
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
Array generation #16
Comments
Hi,
I didn't get this sentence, can you maybe illustrate this with pseudocode? But in general .mlx syntax desugars into plain OCaml syntax so I think any recursive scheme is possible. Regarding the |
/Thanks for the reply! For future readers: passing a mapped list into JSX.list works nicely.
I was trying to write smth like this
This code is supposed to generate a div with 100 spans inside. Instead, it just gives an error:
It would have been nice if I was able to write something like this out of the box
It is a minor gripe though, and yesterday at 1 AM I just couldn't find a way to do it even with JSX.list, so thanks a lot for the help! |
Hello, do you know how to generate lots of similar stuff using mlx? For example, I would like to generate a list of all users. To do that, I would just map list of users into [JSX.element] and call it a day. But for recursive generation of similar elements I would need to get around the fact that <some_recursive_func /> is passed in its parent element via list. I couldn't find if I can do that in ocaml (would like a source if you know how). Generating a range and then mapping it into elements just sounds uncool:)
It would be really nice if you implemented construction <></> like in react
Thanks for help in advance, and Happy New Year!
The text was updated successfully, but these errors were encountered: