This is the prompt I use, for which ChatGPT outputs a perfect program [0] on the first try (and can even convert it to use material-ui, with some prodding):
> Write a react program that I can paste into a codesandbox. It should display a counter that increases by one every second. Below the counter is a button, and when I press it, it decreases the counter by two. If pressing the button would result in the counter decreasing below zero, the button should be disabled.
Bard refuses to attempt it. It did attempt it for one variation of the prompt, but it used class components with an invalid render function and no timer; it looked like it was just pasting something from the first StackOverflow answer from a Google search of the prompt.
To be fair, Google isn't claiming to support this yet. But I'm just replying to the comment saying it can write code.
In the FAQ[1] it explicitly states that it cannot help you code. Maybe that's a limit of the prompt or just a limit of Google using a smaller/cheaper model? We'll have to test it out to see.
Bard faq says writing is not supported and that bard is still learning. I left with the impression that it can but maybe not well enough to have them even attempt to promote it as beta.
This is the prompt I use, for which ChatGPT outputs a perfect program [0] on the first try (and can even convert it to use material-ui, with some prodding):
> Write a react program that I can paste into a codesandbox. It should display a counter that increases by one every second. Below the counter is a button, and when I press it, it decreases the counter by two. If pressing the button would result in the counter decreasing below zero, the button should be disabled.
Bard refuses to attempt it. It did attempt it for one variation of the prompt, but it used class components with an invalid render function and no timer; it looked like it was just pasting something from the first StackOverflow answer from a Google search of the prompt.
To be fair, Google isn't claiming to support this yet. But I'm just replying to the comment saying it can write code.
[0] https://codesandbox.io/s/prod-haze-c28sec