3 ms·
I can give example. Svelte has actions (here details https://svelte.dev/tutorial/actions https://svelte.dev/tutorial/actions). You can take pannable action as a
by daliusd 6y ago
I can give example. Svelte has actions (here details https://svelte.dev/tutorial/actions https://svelte.dev/tutorial/actions). You can take pannable action as a starting point from that page. Now try to write React hook that does the same as pannable Svelte action. You can do it. There are "problems" however:
1) React solution will need a little bit more lines;
2) There are multiple ways to write that and some ways are less efficient than others;
3) React solution is harder to write if you only started with hooks.
I'm going to use React because:
1) I don't need to learn anything new (only hooks) to do what I need;
2) I have richer environment: typescript, testing libraries and all React libraries/solutions I might need. Svelte is getting better and potentially it already covers things I need but that was not the case one year ago.