TL;DR
use-custom-notification をつくった。npm はこちら。
const { notify } = useCustomNotification();
して
<button onClick={() => notify({ children: "HelloWorld" })}>
Say HelloWorld
</button>
すると良い感じに notification が出る。
demo はこちら。
More than 5 years have passed since last update.
use-custom-notification をつくった。npm はこちら。
const { notify } = useCustomNotification();
して
<button onClick={() => notify({ children: "HelloWorld" })}>
Say HelloWorld
</button>
すると良い感じに notification が出る。
demo はこちら。
Register as a new user and use Qiita more conveniently