Can you write a dual-state button using React state?
write your code and run it in your development environment or using our sandbox:
Reference answer
App.js:
import React, { useState } from 'react';
function FlagButton() {
const [flag, setFlag] = useState(false);
return (
<div>
<button onClick={() => setFlag(!flag)}>
flag: { flag ? 'true' : 'false' }
</button>
</div>
);
}
export default function App() {
return (
<FlagButton></FlagButton>
);
}
Can you write a tool which can help users to write text on image to generate a new meme image?
Example:
https://www.weiy.city/functions/static-meme-generator
Related post: