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

Conditional children (subtype) expression #41

Open
wallycarvalho opened this issue Feb 26, 2019 · 0 comments
Open

Conditional children (subtype) expression #41

wallycarvalho opened this issue Feb 26, 2019 · 0 comments

Comments

@wallycarvalho
Copy link

Hey,

Cool Library! Thanks! 🥑

So, I've been trying to conditionally render, for instance, the <Typing.Backspace /> and noticed that:

  1. if I purposefully render a bool or null to avoid the render phase of the child element, it throws an error related to struct.type in utils.js. I believe this function checks for the subtype of Typing but it does not account for this case(?). I haven't looked debugged that part yet. This is merely my suspicion.

  2. the workaround is, in my case, to render the component but with 0'd out values. I.e

<Typist.Backspace delay={0} count={0} />

The delay does not really matter here, but 🤷‍♂️

Thanks! Let me know if this makes sense. If desired, it would be my pleasure to continue debugging and submit a pr for that. 👍

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

1 participant