premieroctet / openchakra

⚡️ Full-featured visual editor and code generator for React using Chakra UI

Home Page:https://openchakra.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom Props always quoted?

normen opened this issue · comments

Hi,

I just started using OpenChakra and it's awesome, thanks for making it!

I was wondering if it was intended that all custom props are always quoted by default. This way it's not possible to insert pure javascript through curly brackets. My onClick functions always end up looking like onClick: "{doClick}" instead of onClick: {doClick}

Thanks for the attention,
Normen

I am not from the team, I discovered the product recently (and fell in love) but I think it's on purpose, it's made to send atomic props.

I think it this tool was think as a UI builder only. If you want to add logic to a component maybe you should either create a custom field to add code (but I don't like this approach because the tool is suppose to be used only for UI purpose) or you can create a custom component and add it to the component tree !

Yeah, I guess so. By now I use the app to do the skeleton and then work in my code editor. When I posted that issue I was at a stage where I still went back and forth a lot.

Hello! Yes, for the moment we only manage primitives like string / number / boolean