const [hashtag, setHashtag] = useState(""); // Create state to store the hashtag // Function to handle changes to the input const handleInputChange = (event) => { setHashtag(event.target.value); }; // You can conditionally display the widget only when a hashtag is entered return ( <div> {/* Input for the hashtag */} <input type="text" value={hashtag} onChange={handleInputChange} placeholder="Search for a hashtag" /> {/* Render widget with dynamic hashtag */} {hashtag && <Widget src="mob.near/widget/N" props={{ hashtag: hashtag }} />} </div> );