I'm experienced with React and was just trying out a small Svelte to-do list to get my feet wet with Svelte and see if it's something I'd like to suggest we try out at work.
However, there's one thing I wanted to clarify that wasn't immediately obvious from the documentation (and to just kickstart some discussion since this community is a little quiet).
In React, if I have a large file doing a good amount of logic, like in the to-list example where I have add logic, remove logic, and toggle logic, all of which can be complex in their own ways if you improve them enough, I am able to extract the logic out into it's own file by creating a custom hook. Like so
const useTodoList = () => {
const [list, setList] = useState([]);
const addItem = (taskName) => {
// task creation logic
setList(l => [...l, newTask]);
}
// logic for removeItem and toggleItem
return { list, addItem, removeItem, toggleItem };
}
Then, I can bring that into my component file by simply doing const { ... } = useTodoList();
and everything should just work. What would the equivalent be in Svelte? It sounds like I would want to leverage the store
concept, but that feels odd to me. I go from having pretty simple logic to having to add additional libraries to my logic. It's a lot of overhead for what should really be a pretty straightforward refactor in React.
Any insight you guys can give would be great! Additionally, I'd love to be able to move the style
as well, but so far haven't found anything that would be suitable for that quite yet. Svelte seems pretty set on having one large file whenever possible.
https://www.youtube.com/watch?v=69bFOYklP-E&feature=youtu.be
and i truly, truly wish it weren'tSUBSCRIBE ► http://bit.ly/2fTwFJy VIDS IN 60 SECONDS ► http://bit.ly/2F9iewhEVEN SHORTER VIDS ► https://bit.ly/3siUkmiTWITC...
https://www.dota2.com/newsentry/6252732681200103716
The International is almost upon us, as the top eighteen teams converge in Indonesia for the third and final showdown of The 2023 Dota Pro Circuit: The Bali Major, presented by IO Esports. Catch the action live online from the Group Stage from June 29th to July 3rd, then tune in for the Playoffs on July 5th to July 9th. As always, keep up to date on all the tournament teams and match standings at www.dota2.com/esports.
At this point in my life, I don't avoid spicy foods because I can't handle the taste of the spice, but more because of what that spice will feel like coming out the other end the next day.
Some cultures, like India for instance, are known to use very spicy ingredients in their daily cooking.
Are they all just used to having firey asses or have they developed some gut biome capable of neutralizing the capcasin before its inevitable exit?
@Notnotmike
@beehaw.org