Ok, all good. But WHY #BING?? It's like hitching a sheep trailer on a Lambo.
#AI #JonyIves #neuralink #wearables
20 minutes start to finish.
Scan 4 songs and edit OCR, switch to development version of app and copy from iCloud Notes into add-track form and thence into json. Copy from json into JS hardcoded songs array which means the app will work offline in airplane mode.
Do a production build and upload. Test in device. 20 minutes. Not at all shabby for an update workflow if I say so myself.
One version of the app, using #React state management, is already completed in development. That will mean when all the popular songs are in the json the user will be able to search and compile their own set list. Just not much point switching this feature on when there are so few songs encoded thus far.
As an academic exercise for my training work I will be doing another version of the searchable app using #Redux state management with #RTK. When I started this I was less enthusiastic about adding Redux to the project so soon. Yesterday it only took one level of prop drilling - passing a different click handler function down to the table in the search component - to make me considerably more enthusiastic about the Redux option.
It's an exercise, for me, myself, I alone, to see which I prefer among #React state management architecture patterns - lifting state up or plumbing in #Redux. With the help of some nifty conditional rendering here, my #choros home page component either displays hardcoded songs (this was a requirement so the app could run during Mass with choristers' devices switched to airplane mode), or custom songs chosen from the search form component. But to make this work, re-using the same (dumb) table component, I have had to do a bit of prop drilling. And that's with only TWO state "little trees" - songs and custom songs. Much as I deplore the extra complexity of Redux, even with #RTK, in a training context, I have commented in the search component that :
// when prop drilling is a solution, redux becomes an option...
Life really is getting more #BlackMirror by the day. Thinking of that one where Miley Cyrus downloads her consciousness into a plastic toy.
{song.words.substr(0, song.words.indexOf(‘<‘).substr(0, 30).concat("...")}
nifty string manipulation cuts off after the first line, truncates to max 30 chars, adds ellipsis
It detects the beginning of a line break tag in the React render (rendered using dangerouslySetInnerHTML)
Can you see what's happening here? I go to import BookService mistakenly as it has no default export. VSC finds the named export, books, and swaps it in with the correct path. Awesome!
Need to play catch-up on the congressional hearings on #UAP whistleblowers. Sounds like they’re summing up today. Thoughts, anyone at all?
Java & Web Development Trainer, London & virtual. Author: The Frontend Cookbook. https://FrontendCookbook.com 25+ years’ prior in photography, filmmaking, web development & design for print. Someday would like to do something humanitarian with codeforireland.org and codefortheuk.com. 🌐