投稿時間:2022-07-20 23:31:53 RSSフィード2022-07-20 23:00 分まとめ(34件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] アイリスオーヤマ、宮城県角田市に新倉庫 40億投資で保管容量2.7倍、狙いは? https://www.itmedia.co.jp/business/articles/2207/20/news166.html itmedia 2022-07-20 22:19:00
python Pythonタグが付けられた新着投稿 - Qiita pythonでyeelightのWorking with Flowを使ってみた https://qiita.com/yutaka_m/items/21e092531f31d781bf66 flowisa 2022-07-20 22:31:15
python Pythonタグが付けられた新着投稿 - Qiita ABC260 A~D問題 ものすごく丁寧でわかりやすい解説 python 灰色~茶色コーダー向け #AtCoder https://qiita.com/sano192/items/a7b90e8d395661ccb5a4 atcoder 2022-07-20 22:28:00
golang Goタグが付けられた新着投稿 - Qiita 蟻本の問題をGo言語で解いてみた(p21 三角形) https://qiita.com/AYukiEngineer/items/e86ef06a4f85771f3c07 長さ 2022-07-20 22:26:12
Ruby Railsタグが付けられた新着投稿 - Qiita ActiveAdminの複数バリデーションエラー時の日本語化 https://qiita.com/khinatas3/items/25e0c89823c68b3741aa activeadmin 2022-07-20 22:52:04
技術ブログ Developers.IO 強みと機会の循環 https://dev.classmethod.jp/articles/strength-and-chance/ 頼り 2022-07-20 13:47:45
海外TECH DEV Community ¡Creando un app que usa Drag and Drop con React sin librerías 👆! https://dev.to/franklin030601/creando-un-app-que-usa-drag-and-drop-con-react-sin-librerias--gm3 ¡Creando un app que usa Drag and Drop con React sin librerías Las aplicaciones que usan drag and drop son muy comunes hoy en día son excelentes para la experiencia de usuario dentro de un app Y probablemente te gustaría implementarlo en tu próximo proyecto En esta ocasión te enseñare como realizar una aplicación que tenga la funcionalidad de drag amp drop pero sin usar alguna librería externa solamente con React JS Nota Este post requiere que sepas las bases de React con TypeScript hooks básicos y custom hooks Cualquier tipo de Feedback es bienvenido gracias y espero disfrutes el articulo   Tabla de contenido Tecnologías a utilizar Creando el proyecto Primeros pasos Creando nuestras tarjetas Creando los contenedores para nuestras tarjetas Definiendo el tipo e interfaz para la información de las tarjetas Creando el componente DragAndDrop tsxAgregando algunos datos para crear tarjetas Mostrando algunas tarjetas Realizando la funcional de Drag Realizando la funcional de Drop Creando el estado para mantener las tarjetas Realizando las funciones para hacer el drop en los contenedores Opcional Refactorización del código en DragAndDrop tsxConclusión Demostración en vivo Código fuente   Tecnologías a utilizar ️React JS version ️Vite JS ️TypeScript ️CSS vanilla Los estilos los encuentras en el repositorio al final de este post   Creando el proyecto Al proyecto le colocaremos el nombre de dnd app opcional tu le puedes poner el nombre que gustes npm init vite latestCreamos el proyecto con Vite JS y seleccionamos React con TypeScript Luego ejecutamos el siguiente comando para navegar al directorio que se acaba de crear cd dnd appLuego instalamos las dependencias npm installDespués abrimos el proyecto en un editor de código en mi caso VS code code Luego con este comando levantaremos el servidor de desarrollo y finalmente vamos a un navegador y accedemos a http localhost en vite version el puerto era localhost pero en la nueva version el puerto es localhost npm run dev  Primeros pasos De una vez creamos la carpeta src components y agregamos el archivo Title tsx y dentro agregamos export const Title gt return lt div className title flex gt lt h gt Creating basic Drag amp Drop lt h gt lt span gt without external libraries lt span gt lt div gt Ahora dentro del archivo src App tsx borramos todo el contenido del archivo y colocamos un componente funcional que muestre el titulo que acabamos de crear import Title from components Title const App gt return lt div className container main flex gt lt Title gt lt div gt export default AppDebería de verse así   Creando nuestras tarjetas Dentro de la carpeta src components agregamos el archivo CardItem tsxPor el momento no recibiráninguna prop lo harádespués export const CardItem gt return lt div className card container gt lt p gt content lt p gt lt div gt Aun NO usaremos el componente Card en un archivo pero si quieres puedes importarlo en el archivo src App tsx para que puedas darle algunos estilos y verlos en pantalla   Creando los contenedores para nuestras tarjetas Ahora vamos a crear nuestro contenedor para las tarjetas Dentro de la carpeta src components agregamos el archivo ContainerCards tsx y agregamos lo siguiente Este componente por el momento recibe como parámetro el estado puedes ver de que tipo es el Status import Status from interfaces interface Props status Status export const ContainerCards status Props gt return lt div className layout cards gt lt p gt status hero lt p gt Cards lt div gt   Definiendo el tipo e interfaz para la información de las tarjetas El type Status es el siguiente export type Status good bad normal Este tipo esta en dentro de la carpeta src interfaces dentro de un archivo index ts el cual deben ir creando ya que el type Status lo usaremos en varios archivos Aprovechando que se están creando el index ts en src interfaces también agreguen la siguiente interfaz Asi es como lucirán los datos de las tarjetas export interface Data id number content string status Status   Creando el componente DragAndDrop tsx Bueno hasta aquíya hemos creado el componente que contendrálas tarjetas pero necesitamos contenedores de tarjetas Uno para lo heroes buenos Uno para lo heroes normales Uno para lo heroes malos Dentro de la carpeta src components agregamos el archivo DragAndDrop tsx y agregamos lo siguiente import Status from interfaces import ContainerCards from ContainerCards const typesHero Status good normal bad export const DragAndDrop gt return lt div className grid gt typesHero map container gt lt ContainerCards status container key container gt lt div gt Este componente debemos agregarlo al src App tsximport DragAndDrop from components DragAndDrop import Title from components Title const App gt return lt div className container main flex gt lt Title gt lt DragAndDrop gt lt div gt export default AppDebería de verse algo como esto por el momento Listo ya tenemos los contenedores donde se podrán soltar las tarjetas y clasificarlas Ahora necesitamos crear algunas tarjetas   Agregando algunos datos para crear tarjetas Ahora creamos una carpeta src assets y dentro un archivo index ts el cual contendráun listado con datos para rellenar las tarjetas import Data from interfaces export const data Data id content Aqua man status good id content Flash status normal id content Green Lantern status good id content Batman status bad Ahora devuelta en src componentes DragAndDrop tsx en componente ContainerCards le pasamos una nueva prop llamada items a dicha prop le pasamos como valor la data que hemos creado en la carpeta src assetsimport ContainerCards from ContainerCards import Status from interfaces import data from assets const typesHero Status good normal bad export const DragAndDrop gt return lt div className grid gt typesHero map container gt lt ContainerCards status container key container items data gt lt div gt Esto nos marcara error ya que items no es una propiedad que ContainerCards este esperando Pero eso lo arreglamos en la siguiente sección   Mostrando algunas tarjetas Para mostrar algunas tarjetas necesitamos hacer unos cambios en los parámetros de cada componente Primero el componente src components CardItem tsxRecibirácomo props la data que es de tipo Data la que habíamos definido con anterioridad De una vez mostramos la propiedad content dentro de data import Data from interfaces interface Props data Data export const CardItem data handleDragging Props gt return lt div className card container gt lt p gt data content lt p gt lt div gt En el componente src components ContainerCards tsx cambiamos las interfaz de Props agregando la propiedad items que es un listado de Data y la desestructuramos en el componenteimport Data Status from interfaces interface Props items Data status Status export const ContainerCards items status Props gt return lt div className layout cards gt lt p gt status hero lt p gt lt div gt Luego debajo de la etiqueta p realizamos una iteración a los items Y retornamos la el CardItem tsx mandando el item a la propiedad de data del CardItemimport Data Status from interfaces import CardItem from CardItem interface Props items Data status Status export const ContainerCards items status Props gt return lt div className layout cards gt lt p gt status hero lt p gt items map item gt lt CardItem data item key item id gt lt div gt Esto te daráuna advertencia de que las key se repiten Esto es debido a que estamos renderizando veces el ContainerCards Pero espera la única propiedad que harála diferencia entre estos componentes es el statusPor lo que haremos la siguiente condición Si el estado que recibe el componente ContainerCards es igual al estado del item o sea del super héroe entonces renderizalo de lo contrario retorna falso import Data Status from interfaces import CardItem from CardItem interface Props items Data status Status export const ContainerCards items status Props gt return lt div className layout cards gt lt p gt status hero lt p gt items map item gt status item status amp amp lt CardItem data item key item id gt lt div gt Y asi evitamos el conflicto con las llaves y se clasificaran las tarjetas de la siguiente manera   Realizando la funcional de Drag Para realizar la funcionalidad de drag primero vamos a definir un estado y una función en src components DragAndDrop tsxEl estado nos ayudara a saber si si esta haciendo drag y asi cambiar los estilos de Y por defecto sera false ya que al inicio de la aplicación no se estaráhaciendo haciendo drag Solo sera true cuando se arrastre alguna tarjeta La función la cual recibe un valor booleano nos ayudara a cambiar al valor al estado esto lo hado para no pasar el setter setIsDragging como prop Pasamos como prop al componente ContainerCards isDragging tendráel valor del estadohandleDragging sera la función que creamos para actualizar el estado import ContainerCards from ContainerCards import data from assets import Status from interfaces const typesHero Status good normal bad export const DragAndDrop gt const isDragging setIsDragging useState false const handleDragging dragging boolean gt setIsDragging dragging return lt div className grid gt typesHero map container gt lt ContainerCards items data status container key container isDragging isDragging handleDragging handleDragging gt lt div gt Esto marcara error porque ContainerCards no espera esas propiedades Asi que vamos a tener que cambiar la interfaz de ContainerCardsEl el archivo src components ContainerCards tsxinterface Props items Data status Status isDragging boolean handleDragging dragging boolean gt void Y de una vez obtenemos esas props Nota que en el className del div colocamos una condición donde si isDragging es verdadero entonces agregamos la clase layout dragging Esta clase solo cambiara el color de fondo y el borde del contenedor cuando se arrastre una tarjeta Nota que también pasamos una nueva prop al CardItem la cual es handleDragging esto es porque la tarjeta es el componente que va actualizar el estado que creamos con anterioridad import CardItem from CardItem import Data Status from interfaces interface Props items Data status Status isDragging boolean handleDragging dragging boolean gt void export const ContainerCards items status isDragging handleDragging Props gt return lt div className layout cards isDragging layout dragging gt lt p gt status hero lt p gt items map item gt status item status amp amp lt CardItem data item key item id handleDragging handleDragging gt lt div gt El CardItem nos marcara error ya que no espera la propiedad handleDragging por lo que debemos modificar su interfaz Ahora en el archivo src components CardItem tsx modificamos la interfazinterface Props data Data handleDragging dragging boolean gt void Y ahora si empezamos a agregar la funcionalidad de drag en este componente Primero al div que es el toda la tarjeta le agregamos el atributo draggable para indicar que este componente se puede arrastrar import Data from interfaces interface Props data Data handleDragging dragging boolean gt void export const CardItem data handleDragging Props gt return lt div className card container draggable gt lt p gt data content lt p gt lt div gt Luego agregamos el atributo onDragEnd que va a ejecutar la función handleDragEnd Dicha función lo único que haráes colocar el valor del estado isDragging en false porque cuando se ejecute onDragEnd ya se habrádejado de arrastrar la tarjeta por lo que tenemos que quitar los estilos de cuando se hace drag o sea volver todos los estilos como al inicio import Data from interfaces interface Props data Data handleDragging dragging boolean gt void export const CardItem data handleDragging Props gt const handleDragEnd gt handleDragging false return lt div className card container draggable onDragEnd handleDragEnd gt lt p gt data content lt p gt lt div gt Luego agregamos el atributo onDragStart se ejecuta cuando se empieza arrastrar el componente si no le colocáramos el atributo draggable entonces onDragStart no se ejecutaría onDragStart va ejecutar la función handleDragStart Esta función recibe el evento y dentro del evento hay una propiedad que nos interesa que es la de dataTransfer La propiedad dataTransfer nos permite contener u obtener datos cuando se esta arrastrando un elemento La propiedad setData dentro de dataTransfer establece los datos que queremos contener al momento de arrastrar un elemento y recibe dos parámetros format es un identificador que representa la data a contener Puede ser lo que sea pero tiene que ser un string En este caso le colocaremos la palabra card data es la información que queremos contener mientras se hace el arrastre del elemento Solo acepta un string En este caso almacenaremos el id de la tarjeta NOTA también existe una propiedad dentro de dataTransfer llamada clearData que limpia el cache de los datos que almacenamos En este caso no es necesario ejecutarlo ya que vamos a estar sobrescribiendo el mismo identificador card Después de contener la data ejecutamos handleDragging mandando el valor de true para indicar al usuario que estamos arrastrando un elemento import Data from interfaces interface Props data Data handleDragging dragging boolean gt void export const CardItem data handleDragging Props gt const handleDragStart e React DragEvent lt HTMLDivElement gt gt e dataTransfer setData card data id handleDragging true const handleDragEnd gt handleDragging false return lt div className card container draggable onDragStart handleDragStart onDragEnd handleDragEnd gt lt p gt data content lt p gt lt div gt Y asi tendríamos la parte de arrastrar un elemento ya tendríamos la información contenida lista para obtenerla cuando se suelte en otro contenedor Asi se vería cuando arrastramos una tarjeta cambia el diseño de los contenedores indicando que son los lugares donde puedes soltar la tarjeta   Realizando la funcional de Drop Antes de hacer la parte de soltar el elemento debemos realizar otras cosas antes Creando el estado para mantener las tarjetas Primero establecer la lista de heroes en un estado y poder actualizarla cuando se suelte la tarjeta en otro contenedor en ese momento actualizaríamos la propiedad status del héroe lo que provocara que se vuelva a renderizar de nuevo el listado organizando las tarjetas que cambiaron Para eso vamos a src components DragAndDrop tsx y creamos un nuevo estado Su valor inicial va a ser la data que hemos definido previamente en src assets import data from assets const listItems setListItems useState lt Data gt data Y ahora al momento de renderizar el componente ContainerCards en vez de pasar el valor de data a la prop de items le mandaremos el valor del estado listItems import ContainerCards from ContainerCards import data from assets import Status from interfaces const typesHero Status good normal bad export const DragAndDrop gt const isDragging setIsDragging useState false const listItems setListItems useState lt Data gt data const handleDragging dragging boolean gt setIsDragging dragging return lt div className grid gt typesHero map container gt lt ContainerCards items listItems status container key container isDragging isDragging handleDragging handleDragging gt lt div gt Después crearemos una función para actualizar el estado de la listItems La llamaremos handleUpdateList y recibirádos parámetros id el identificador de la tarjeta sera de tipo número status el nuevo estado de la tarjeta sera de tipo Status Dentro de la función Primero buscaremos el elemento en el valor del estado listItems mediante el ID Evaluaremos si los datos existen y si el status que nos pasan es diferente al status que ya tiene entonces haremos los cambios en el estado Dentro de la condición accedemos a la tarjeta encontrada y actualizaremos su propiedad status asignándole el nuevo status que nos llega por parámetro en la función Llamamos al setListItems para actualizar el estado colocando La tarjeta con su propiedad status actualizada Un nuevo arreglo filtrando los elementos para quitar el tarjeta que estamos actualizando y evitar que se duplique la información Ahora al componente ContainerCards le agregamos una nueva propiedad llamada handleUpdateList y le mandamos la función que acabamos de crear handleUpdateList import ContainerCards from ContainerCards import data from assets import Status from interfaces const typesHero Status good normal bad export const DragAndDrop gt const isDragging setIsDragging useState false const listItems setListItems useState lt Data gt data const handleDragging dragging boolean gt setIsDragging dragging const handleUpdateList id number status Status gt let card listItems find item gt item id id if card amp amp card status status card status status setListItems prev gt card prev filter item gt item id id return lt div className grid gt typesHero map container gt lt ContainerCards items listItems status container key container isDragging isDragging handleDragging handleDragging handleUpdateList handleUpdateList gt lt div gt Esto nos marcara error porque el componente ContainerCards no espera la propiedad handleUpdateList asi que debemos actualizar la interfaz de ContainerCards En src components ContainerCards tsx interface Props items Data status Status isDragging boolean handleDragging dragging boolean gt void handleUpdateList id number status Status gt void   Realizando las funciones para hacer el drop en los contenedores Estamos en src components ContainerCards tsx Dentro del componente vamos a establecer dos propiedades nuevas al elemento div onDragOver se produce cuando un elemento que es arrastrable se arrastra sobre un objetivo de soltar valido Le pasamos la función handleDragOver que crearemos en un instante onDrop se produce cuando el elemento arrastrado se deja caer Le pasamos la función handleDrop que crearemos en un instante lt div className layout cards isDragging layout dragging onDragOver handleDragOver onDrop handleDrop gt lt p gt status hero lt p gt items map item gt status item status amp amp lt CardItem data item key item id handleDragging handleDragging gt lt div gt La función handleDragOver solo haráesto Primero recibiráel evento que emite onDragOver Ya que por defecto los datos no pueden ser soltados en otros elementos y para permitir soltarlos debemos evitar el comportamiento por defecto const handleDragOver e React DragEvent lt HTMLDivElement gt gt e preventDefault Ahora la función handleDrop Primero recibiráel evento que emite onDrop Dentro de la función evitamos el comportamiento por defecto el cual se nota mas con imágenes cuando soltamos una imagen en un lugar de nuestra app abre la imagen sacándonos de la app Entonces del evento obtenemos la propiedad dataTransfer y mediante la propiedad de getData de dataTransfer la ejecutamos mandando el identificador del cual obtendremos el ID de la tarjeta El signo de al inicio de e dataTransfer getData card es para convertir el valor a un número Luego llamaremos la función handleUpdateList que el componente nos pasa por props hay que desestructurarlo del componente Le pasamos primero el id que obtuvimos de la propiedad getData de dataTransfer ya convertido en número Después le pasamos el status que recibimos por props en el componente Finalmente llamamos handleDragging mandando el valor de false para indicar al usuario que ya no estamos arrastrando nada const handleDrop e React DragEvent lt HTMLDivElement gt gt e preventDefault const id e dataTransfer getData card handleUpdateList id status handleDragging false Asíse vería el código de src components ContainerCards tsximport Data Status from interfaces import CardItem from CardItem interface Props items Data status Status isDragging boolean handleUpdateList id number status Status gt void handleDragging dragging boolean gt void export const ContainerCards items status isDragging handleDragging handleUpdateList Props gt const handleDrop e React DragEvent lt HTMLDivElement gt gt e preventDefault handleUpdateList e dataTransfer getData card status handleDragging false const handleDragOver e React DragEvent lt HTMLDivElement gt gt e preventDefault return lt div className layout cards isDragging layout dragging onDrop handleDrop onDragOver handleDragOver gt lt p gt status hero lt p gt items map item gt status item status amp amp lt CardItem data item key item id handleDragging handleDragging gt lt div gt El resultado final debería verse de esta manera   Opcional Refactorización del código en DragAndDrop tsx Tenemos bastante lógica en nuestro componente por lo cual seria una buena opción crear un custom hook para administrar esa lógica Creamos una carpeta de src hooks y dentro un archivo llamado useDragAndDrop tsPrimero definimos la función la cual recibiráun estado inicial que sera de tipo arreglo de Dataexport const useDragAndDrop initialState Data gt Del componente DragAndDrop tsx recortamos toda la lógica y la colocamos en el custom hook El valor inicial del estado de listItems sera que nos pasen por parámetro del hook Y por ultimo retornamos como un objeto isDragging listItems handleUpdateList handleDragging import useState from react import Data Status from interfaces export const useDragAndDrop initialState Data gt const isDragging setIsDragging useState false const listItems setListItems useState lt Data gt initialState const handleUpdateList id number status Status gt let card listItems find item gt item id id if card amp amp card status status card status status setListItems prev gt card prev filter item gt item id id const handleDragging dragging boolean gt setIsDragging dragging return isDragging listItems handleUpdateList handleDragging Ahora en el componente src components DragAndDrop tsx llamamos a nuestro custom hook Le mandamos la data a nuestro hook por parámetro y solo desestructuramos las propiedades y listo import ContainerCards from ContainerCards import useDragAndDrop from hooks useDragAndDrop import Status from interfaces import data from assets const typesHero Status good normal bad export const DragAndDrop gt const isDragging listItems handleDragging handleUpdateList useDragAndDrop data return lt div className grid gt typesHero map container gt lt ContainerCards items listItems status container key container isDragging isDragging handleDragging handleDragging handleUpdateList handleUpdateList gt lt div gt Asíquedara mas legible tu componente   Conclusión Este proceso es una de las formas de construir una aplicación con funcionalidad de Drag amp Drop sin usar librerías externas Una forma de mejorar esta aplicación seria usando un administrador de estado para evitar estar pasando demasiadas props a los componentes Si quieres algo mas elaborado y expandir las funcionalidades puedes optar por un paquete de terceros que te recomiendo bastante y es react beautiful dnd una librería muy buena y popular Espero haberte ayudado a entender como realizar este ejercicio muchas gracias por llegar hasta aquí ️Te invito a que comentes si es que este articulo te resulta útil o interesante o si es que conoces alguna otra forma distinta o mejor de como hacer un drag amp drop   Demostración en vivo Código fuente Franklin drag and drop react Creating an application using Drag amp Drop with React JS Creating an app using Drag and Drop with React without libraries This time we are going to implement the functionality to do a Drag amp Drop with React JS and without any other external package or library   Features ️Card dragging Dropping cards into a container Sorting cards  Technologies React JSTypeScriptVite JSVanilla CSS  Installation Clone the repository you need to have Git installed git clone Install dependencies of the project npm installRun the project npm run dev Links ️Demo of the application Here s the link to the tutorial in case you d like to take a look at it eyes View on GitHub 2022-07-20 13:33:28
海外TECH DEV Community Creating an app using Drag and Drop with React without libraries 👆! https://dev.to/franklin030601/creating-an-app-using-drag-and-drop-with-react-without-libraries--5cg9 Creating an app using Drag and Drop with React without libraries Drag and drop applications are very common nowadays they are great for the user experience inside an app And you would probably like to implement it in your next project This time I ll show you how to make an application that has drag amp drop functionality but without using any external library only with React JS Note This post requires you to know the basics of React with TypeScript basic hooks and custom hooks Any kind of feedback is welcome thanks and I hope you enjoy the article   Table of contents Technologies to be used Creating the project First steps Creating our cards Creating the containers for our cards Defining the type and interface for the cards information Creating the DragAndDrop tsx component Adding some data to create cards Showing some cards Performing the Drag Performing the Drop Creating the state to hold the cards Performing the functions to make the drop in the containers Optional Refactoring the code in DragAndDrop tsxConclusion Live demo Source code   Technologies to be used ️React JS v ️Vite JS ️TypeScript ️CSS vanilla You can find the styles in the repository at the end of this post   Creating the project We will name the project dnd app optional you can name it whatever you like npm init vite latestWe create the project with Vite JS and select React with TypeScript Then we run the following command to navigate to the directory just created cd dnd appThen we install the dependencies npm installThen we open the project in a code editor in my case VS code code Then with this command we will raise the development server and finally we go to a browser and access http localhost in vite version the port was localhost but in the new version the port is localhost npm run dev  First steps At once we create the folder src components and add the file Title tsx and inside we add export const Title gt return lt div className title flex gt lt h gt Creating basic Drag amp Drop lt h gt lt span gt without external libraries lt span gt lt div gt Now inside the file src App tsx we delete all the content of the file and we place a functional component that shows the title that we have just created import Title from components Title const App gt return lt div className container main flex gt lt Title gt lt div gt export default AppIt should look like this   Creating our cards Inside the folder src components we add the file CardItem tsx At the moment it will not receive any prop it will do it later export const CardItem gt return lt div className card container gt lt p gt content lt p gt lt div gt We will NOT use the Card component in a file yet but if you want you can import it into the src App tsx file so you can style it and see it on screen   Creating the containers for our cards Now let s create our container for the cards Inside the folder src components we add the file ContainerCards tsx and add the following This component for the moment receives as parameter the status you can see what type is the Status import Status from interfaces interface Props status Status export const ContainerCards status Props gt return lt div className layout cards gt lt p gt status hero lt p gt Cards lt div gt   Defining the type and interface for the cards information The type Status is as follows export type Status good bad normal This type is inside the folder src interfaces inside a file index ts which must be created since the type Status will be used in several files While creating the index ts in src interfaces also add the following interface This is how the card data will look like export interface Data id number content string status Status   Creating the DragAndDrop tsx component Well so far we have already created the component that will contain the cards but we need card containers One for the good heroes One for the normal heroes One for the bad heroes Inside the folder src components we add the file DragAndDrop tsx and add the following import Status from interfaces import ContainerCards from ContainerCards const typesHero Status good normal bad export const DragAndDrop gt return lt div className grid gt typesHero map container gt lt ContainerCards status container key container gt lt div gt This component must be added to src App tsx import DragAndDrop from components DragAndDrop import Title from components Title const App gt return lt div className container main flex gt lt Title gt lt DragAndDrop gt lt div gt export default AppIt should look something like this for the time being Now we have the containers where the cards can be dropped and sorted Now we need to create some cards   Adding some data to create cards Now we create a folder src assets and inside it a file index ts which will contain a list with data to fill in the cards import Data from interfaces export const data Data id content Aqua man status good id content Flash status normal id content Green Lantern status good id content Batman status bad Now returned in src components DragAndDrop tsx in component ContainerCards we pass a new prop called items to this prop we pass as value the data we have created in the folder src assets import ContainerCards from ContainerCards import Status from interfaces import data from assets const typesHero Status good normal bad export const DragAndDrop gt return lt div className grid gt typesHero map container gt lt ContainerCards status container key container items data gt lt div gt This will throw an error because items is not a property that ContainerCards is expecting But we fix that in the next section   Showing some cards To display some cards we need to make some changes in the parameters of each component First the component src components CardItem tsx It will receive as props the data that is of type Data the one that we had defined previously At once we show the property content inside data import Data from interfaces interface Props data Data export const CardItem data handleDragging Props gt return lt div className card container gt lt p gt data content lt p gt lt div gt In the component src components ContainerCards tsx we change the Props interface by adding the items property which is a list of Data and destructuring it in the componentimport Data Status from interfaces interface Props items Data status Status export const ContainerCards items status Props gt return lt div className layout cards gt lt p gt status hero lt p gt lt div gt Then under the p tag we perform an iteration to the items And we return the CardItem tsx sending the item to the data property of the CardItem import Data Status from interfaces import CardItem from CardItem interface Props items Data status Status export const ContainerCards items status Props gt return lt div className layout cards gt lt p gt status hero lt p gt items map item gt lt CardItem data item key item id gt lt div gt This will give you a warning that the keys are repeated This is because we are rendering times the ContainerCards But wait the only property that will make the difference between these components is the status So we will make the following condition If the status received by the ContainerCards component is equal to the status of the item i e of the super hero then render it otherwise return false import Data Status from interfaces import CardItem from CardItem interface Props items Data status Status export const ContainerCards items status Props gt return lt div className layout cards gt lt p gt status hero lt p gt items map item gt status item status amp amp lt CardItem data item key item id gt lt div gt And so we avoid the conflict with the keys and the cards will be sorted as follows   Performing the Drag To perform the drag functionality we will first define a state and a function in src components DragAndDrop tsx The state will help us to know if it is doing drag and thus to change the styles of And by default it will be false since at the beginning of the application it will not be doing drag It will only be true when dragging a card The function which receives a boolean value will help us to change the value to the state this is done to avoid passing the setter setIsDragging as prop We pass as prop to the ContainerCards component isDragging it will have the value of the state handleDragging will be the function that we create to update the state import ContainerCards from ContainerCards import data from assets import Status from interfaces const typesHero Status good normal bad export const DragAndDrop gt const isDragging setIsDragging useState false const handleDragging dragging boolean gt setIsDragging dragging return lt div className grid gt typesHero map container gt lt ContainerCards items data status container key container isDragging isDragging handleDragging handleDragging gt lt div gt This will fail because ContainerCards does not expect those properties So we will have to change the interface of ContainerCards The file src components ContainerCards tsx interface Props items Data status Status isDragging boolean handleDragging dragging boolean gt void And in one go we get those props Note that in the className of the div we place a condition where if isDragging is true then we add the class layout dragging This class will only change the background color and the border of the container when a card is dragged Note that we also pass a new prop to the CardItem which is handleDragging this is because the card is the component that will update the state that we created previously import CardItem from CardItem import Data Status from interfaces interface Props items Data status Status isDragging boolean handleDragging dragging boolean gt void export const ContainerCards items status isDragging handleDragging Props gt return lt div className layout cards isDragging layout dragging gt lt p gt status hero lt p gt items map item gt status item status amp amp lt CardItem data item key item id handleDragging handleDragging gt lt div gt The CardItem will give us an error because it does not expect the handleDragging property so we must modify its interface Now in the file src components CardItem tsx we modify the interfaceinterface Props data Data handleDragging dragging boolean gt void And now yes we begin to add the drag functionality in this component First to the div which is the whole card we add the attribute draggable to indicate that this component can be dragged import Data from interfaces interface Props data Data handleDragging dragging boolean gt void export const CardItem data handleDragging Props gt return lt div className card container draggable gt lt p gt data content lt p gt lt div gt Then we add the attribute onDragEnd that will execute the function handleDragEnd This function will only set the value of the isDragging status to false because when onDragEnd is executed the card will no longer be dragged so we have to remove the styles when dragging that is return all the styles as at the beginning import Data from interfaces interface Props data Data handleDragging dragging boolean gt void export const CardItem data handleDragging Props gt const handleDragEnd gt handleDragging false return lt div className card container draggable onDragEnd handleDragEnd gt lt p gt data content lt p gt lt div gt Then we add the onDragStart attribute it is executed when the component starts dragging if we did not add the draggable attribute then onDragStart would not be executed onDragStart will execute the handleDragStart function This function receives the event and inside the event there is a property that interests us which is dataTransfer The dataTransfer property allows us to contain or obtain data when an element is being dragged The setData property within dataTransfer establishes the data that we want to contain when dragging an element and receives two parameters format it is an identifier that represents the data to contain It can be anything but it has to be a string In this case we will put the word card data is the information that we want to contain while dragging the element It only accepts a string In this case we will store the id of the card NOTE there is also a property inside dataTransfer called clearData that clears the cache of the data we store In this case it is not necessary to execute it since we will be overwriting the same identifier card After containing the data we execute handleDragging sending the value of true to indicate to the user that we are dragging an element import Data from interfaces interface Props data Data handleDragging dragging boolean gt void export const CardItem data handleDragging Props gt const handleDragStart e React DragEvent lt HTMLDivElement gt gt e dataTransfer setData card data id handleDragging true const handleDragEnd gt handleDragging false return lt div className card container draggable onDragStart handleDragStart onDragEnd handleDragEnd gt lt p gt data content lt p gt lt div gt And so we would have the part of dragging an element we would already have the contained information ready to get it when we drop it in another container This is how it would look when we drag a card it changes the design of the containers indicating that they are the places where you can drop the card   Performing the Drop Before we do the part of releasing the element we must do other things first Creating the state to hold the cards First to establish the list of heroes in a state and to be able to update it when the card is dropped in another container at that moment we would update the status property of the hero which will cause that the list is rendered again organizing the cards that changed For that we go to src components DragAndDrop tsx and create a new status Its initial value will be the data that we have previously defined in src assets import data from assets const listItems setListItems useState lt Data gt data And now when rendering the ContainerCards component instead of passing the value of data to the items prop we will send it the value of the listItems state import ContainerCards from ContainerCards import data from assets import Status from interfaces const typesHero Status good normal bad export const DragAndDrop gt const isDragging setIsDragging useState false const listItems setListItems useState lt Data gt data const handleDragging dragging boolean gt setIsDragging dragging return lt div className grid gt typesHero map container gt lt ContainerCards items listItems status container key container isDragging isDragging handleDragging handleDragging gt lt div gt Then we will create a function to update the state of the listItems We will call it handleUpdateList and it will receive two parameters id the identifier of the card it will be of type number status the new status of the card it will be of type Status Inside the function First we will look for the element in the listItems status value by means of the ID We will evaluate if the data exists and if the status that is passed to us is different from the status that it already has then we will make the changes in the status Within the condition we access to the found card and we will update its status property assigning it the new status that comes to us by parameter in the function We call the setListItems to update the status placing The card with its updated status property A new array filtering the items to remove the card we are updating and avoid duplicating the information Now to the ContainerCards component we add a new property called handleUpdateList and send it the function we just created handleUpdateList import ContainerCards from ContainerCards import data from assets import Status from interfaces const typesHero Status good normal bad export const DragAndDrop gt const isDragging setIsDragging useState false const listItems setListItems useState lt Data gt data const handleDragging dragging boolean gt setIsDragging dragging const handleUpdateList id number status Status gt let card listItems find item gt item id id if card amp amp card status status card status status setListItems prev gt card prev filter item gt item id id return lt div className grid gt typesHero map container gt lt ContainerCards items listItems status container key container isDragging isDragging handleDragging handleDragging handleUpdateList handleUpdateList gt lt div gt This will give us an error because the ContainerCards component does not expect the handleUpdateList property so we must update the ContainerCards interface In src components ContainerCards tsx interface Props items Data status Status isDragging boolean handleDragging dragging boolean gt void handleUpdateList id number status Status gt void   Performing the functions to make the drop in the containers We are in src components ContainerCards tsx Inside the component we are going to set two new properties to the div element onDragOver occurs when a draggable element is dragged over a valid drop target We pass it the handleDragOver function which we will create in a moment onDrop occurs when the dragged element is dropped We pass it the handleDrop function which we will create in a moment lt div className layout cards isDragging layout dragging onDragOver handleDragOver onDrop handleDrop gt lt p gt status hero lt p gt items map item gt status item status amp amp lt CardItem data item key item id handleDragging handleDragging gt lt div gt The handleDragOver function will only do this First it will receive the event that emits onDragOver Since by default data cannot be dropped on other elements and to allow dropping we must avoid the default behavior const handleDragOver e React DragEvent lt HTMLDivElement gt gt e preventDefault Now the handleDrop function First you will receive the event that emits onDrop Inside the function we avoid the default behavior which is more noticeable with images when we drop an image in a place of our app it opens the image taking us out of the app Then from the event we obtain the property dataTransfer and through the getData property of dataTransfer we execute it sending the identifier from which we will obtain the ID of the card The sign at the beginning of e dataTransfer getData card is to convert the value to a number Then we will call the handleUpdateList function that the component passes us by props we have to unstructure it from the component First we pass it the id that we obtained from the getData property of dataTransfer already converted to a number Then we pass it the status that we received by props in the component Finally we call handleDragging sending the value of false to indicate to the user that we are no longer dragging anything const handleDrop e React DragEvent lt HTMLDivElement gt gt e preventDefault const id e dataTransfer getData card handleUpdateList id status handleDragging false This is what the code in src components ContainerCards tsx would look like import Data Status from interfaces import CardItem from CardItem interface Props items Data status Status isDragging boolean handleUpdateList id number status Status gt void handleDragging dragging boolean gt void export const ContainerCards items status isDragging handleDragging handleUpdateList Props gt const handleDrop e React DragEvent lt HTMLDivElement gt gt e preventDefault handleUpdateList e dataTransfer getData card status handleDragging false const handleDragOver e React DragEvent lt HTMLDivElement gt gt e preventDefault return lt div className layout cards isDragging layout dragging onDrop handleDrop onDragOver handleDragOver gt lt p gt status hero lt p gt items map item gt status item status amp amp lt CardItem data item key item id handleDragging handleDragging gt lt div gt The end result should look like this   Optional Refactoring the code in DragAndDrop tsx We have enough logic in our component so it would be a good option to create a custom hook to manage that logic We create a src hooks folder and inside a file called useDragAndDrop ts First we define the function which will receive an initial state that will be of type Data array export const useDragAndDrop initialState Data gt From the component DragAndDrop tsx we cut all the logic and we place it in the custom hook The initial value of the state of listItems will be the one passed to us by parameter of the hook And finally we return as an object isDragging listItems handleUpdateList handleDragging import useState from react import Data Status from interfaces export const useDragAndDrop initialState Data gt const isDragging setIsDragging useState false const listItems setListItems useState lt Data gt initialState const handleUpdateList id number status Status gt let card listItems find item gt item id id if card amp amp card status status card status status setListItems prev gt card prev filter item gt item id id const handleDragging dragging boolean gt setIsDragging dragging return isDragging listItems handleUpdateList handleDragging Now in the component src components DragAndDrop tsx we call our custom hook We send the data to our hook by parameter and we just unstructure the properties and that s it import ContainerCards from ContainerCards import useDragAndDrop from hooks useDragAndDrop import Status from interfaces import data from assets const typesHero Status good normal bad export const DragAndDrop gt const isDragging listItems handleDragging handleUpdateList useDragAndDrop data return lt div className grid gt typesHero map container gt lt ContainerCards items listItems status container key container isDragging isDragging handleDragging handleDragging handleUpdateList handleUpdateList gt lt div gt This will make your component more readable   Conclusion This process is one of the ways to build an application with Drag amp Drop functionality without using external libraries One way to improve this application would be to use a state manager to avoid passing too many props to the components If you want something more elaborate and expand the functionality you can opt for a third party package that I highly recommend and that is react beautiful dnd a very good and popular library I hope I helped you understand how to perform this exercise thank you very much for making it this far ️I invite you to comment if you find this article useful or interesting or if you know any other different or better way of how to do a drag amp drop   Live demo Source code Franklin drag and drop react Creating an application using Drag amp Drop with React JS Creating an app using Drag and Drop with React without libraries This time we are going to implement the functionality to do a Drag amp Drop with React JS and without any other external package or library   Features ️Card dragging Dropping cards into a container Sorting cards  Technologies React JSTypeScriptVite JSVanilla CSS  Installation Clone the repository you need to have Git installed git clone Install dependencies of the project npm installRun the project npm run dev Links ️Demo of the application Here s the link to the tutorial in case you d like to take a look at it eyes View on GitHub 2022-07-20 13:32:40
Apple AppleInsider - Frontpage News How to batch rename files in macOS https://appleinsider.com/articles/21/06/23/how-to-batch-rename-files-in-macos?utm_medium=rss How to batch rename files in macOSIf you have to collect a number of files in the same folder but want to title them in a more orderly fashion you need to learn how to master renaming files in macOS We can all learn to be neater when collecting files in a folder Sometimes if you are putting together a collection of documents and files for someone else or for safekeeping you ll find that the document names aren t entirely right for the task This is especially the case when you are pulling in files from multiple sources into a single folder Read more 2022-07-20 13:54:50
Apple AppleInsider - Frontpage News China iPhone shipments up 227% year-over-year in June 2022 https://appleinsider.com/articles/22/07/20/china-iphone-shipments-up-227-year-over-year-in-june-2022?utm_medium=rss China iPhone shipments up year over year in June Apple iPhone shipments in China are up more than year over year according to UBS estimates that hint at solid June quarter results for the company iPhone modelsIn a note to investors seen by AppleInsider UBS analyst David Vogt offers a few thoughts on iPhone shipments in the June quarter as well as shipments in to date Read more 2022-07-20 13:50:44
Apple AppleInsider - Frontpage News Twitter will face Elon Musk in court in October https://appleinsider.com/articles/22/07/20/twitter-will-face-elon-musk-in-court-in-october?utm_medium=rss Twitter will face Elon Musk in court in OctoberThe lawsuit over Elon Musk s attempt to back out of buying Twitter will now be held in October despite the Tesla CEO s lawyers pressing for a date Elon MuskShortly after Musk filed to try to exit his billion deal to buy Twitter the social media company sued him The court s decision to hold it in October is significantly closer to the social media site s request to have it in September than it is to Musk s for a February one Read more 2022-07-20 13:38:46
Apple AppleInsider - Frontpage News Daily deals July 20: iPad mini 6 for $400, AirPods Pro for $180, RTX 3090 for 50% off, more https://appleinsider.com/articles/22/07/20/daily-deals-july-20-ipad-mini-6-for-400-airpods-pro-for-180-rtx-3090-for-50-off-more?utm_medium=rss Daily deals July iPad mini for AirPods Pro for RTX for off moreWednesday s best deals include an Apple Watch Series Woot scratch and dent sale off a Logitech wireless gaming headset a TB Kingston USB C SSD for and much more Best deals July On a daily basis AppleInsider checks online stores to uncover discounts on products including Apple hardware mobile devices hardware upgrades smart TVs and accessories The best offers are compiled into our daily deals post for you to enjoy Read more 2022-07-20 13:23:02
海外TECH Engadget The best educational toys for kids https://www.engadget.com/best-educational-toys-for-kids-123055311.html?src=rss The best educational toys for kidsIt s tempting to get your kid every shiny new toy they ask for But some toys are better than others when it comes to actually stimulating your child s brain while also keeping them entertained The parents on the Engadget staff know this well and we ve tried out a bunch of educational toys with our kids with various results These are some of the ones that have had staying power with our children ーand even we adults have to admit we found them pretty fun too Magna TilesEngadgetThere are tons of building toys out there from LEGO to Tegu to the classic wooden block But one of my favorites and my kid s are Magna Tiles These large colorful construction toys come in a variety of sizes and shapes and click together or to other surfaces with the aid of powerful magnets They can be combined to form simple shapes like cubes and pyramids or arranged to make magnetic art on a garage door Plus there are themed packs that can add windows staircases or even functional cranes to the playsets These are open ended building toys that don t have set instructions for making a particular scene or item They re safe for a three year old and fun for much older kids too Honestly as a nearly year old man even I have a blast finding new and interesting ways to create ever more elaborate structures with my son We ve built castles spaceships racecars and even a ferry terminal complete with a moveable boarding ramp At for a piece set Magna Tiles certainly aren t cheap but they re definitely the sort of toy that will keep your child entertained for years to come while also helping them learn valuable problem solving skills ー Terrence O Brien Managing EditorShop Magna Tiles at AmazonKindle Kids EditionWill Lipman Photography for EngadgetI can tell you first hand that Amazon s Fire tablets for kids are great for little ones They can withstand the carelessness of a young child and offer access to tons of content with parental controls However once your kid gets a little older a dedicated device for books with fewer distractions is a better option And for exactly that reason Amazon makes a kid friendly version of its Kindle e reader The device comes with a protective cover and one year of the company s Kids service for unlimited access to books month afterwards There are no videos or games on the Kindle Kids but it does offer access to Audible It can store books for offline reading and battery life lasts for weeks at a time Most importantly parental controls allow you to monitor content and a dedicated dashboard keeps tabs on their reading habit over time ーBilly Steele Senior News EditorBuy Kindle Kids Edition at Amazon Lovevery play kitsLoveveryIt can be a daunting task picking the best toys to help your baby learn and develop through the toddler and preschool years Lovevery tries to reduce the stress by doing all the picking for you It s a mail order service that delivers specifically timed play kits designed around Montessori tenets for different developmental windows Each box is a mix of toys and books or cards for little babies that start at birth and go all the way up to four years old The kits come every two months through the first year At this point things get understandably more complex and the boxes arrive every three months The kits aren t cheap the boxes for babies are each and when you hit one year they go up to I can attest after nearly a year and a half that the service is great It has been nice to refresh our child s toys with things that are more appropriate for his developmental stage on a regular basis Everything is safe and well built and most importantly highly engaging ーB S Shop Lovevery kitsSmart Lab Smart CircuitsSmart LabWhen it comes to introducing kids to electronics there are a ton of options but I personally like the Smart Circuits kit It can take a kid from simple blinking lights to complex motion controlled games The snap together baseboard can lie flat on a table like a regular breadboard but it can also be folded into a cube or the pieces can be attached at a degree angle This gives kids an extra element to play with when they graduate to designing their own circuits The kit itself only has a few pieces but they re quite flexible And they re all housed in large colorful plastic that should be easy for a kid to handle There s the usual electronics kid fare like LEDs a speaker a potentiometer and two buttons But there s also a tilt switch a light sensor and a microprocessor capable of handling some relatively robust tasks The kit comes with instructions for projects but with the parts available a creative child could build quite a few more My one critique is that the jumper wires can be tough to insert and might require a bit of patience ーsomething we know not every eight year old has an abundance of nbsp ー T O Buy Smart Circuits at Amazon Playskool Shape SorterPlayskoolA shape sorter is an awesome toy for younger kids because it encourages hand eye coordination fine motor skills problem solving and even vocabulary by identifying the names of shapes and colors My kids have a few of them but the one I like most is this Playskool model and here s why The lid latches which means they can t just dump the shapes out easily they have to learn how to work the mechanics of the lid as well Also the multi colored shapes have tactile patterns on them that match the area of the box they re supposed to fit into and that gives me another teaching opportunity The whole thing is durable too ーmy son likes to chew on the shapes and my daughter likes to stand on the box but despite that abuse there s not so much as a dent or a scratch on it And because it s only it makes a great gift if you re buying for someone else s kiddo ー Amber Bouman Associate Editor ParentingBuy Shape Sorter at Amazon Yoto PlayerWill Lipman Photography for EngadgetThe Yoto Player is the perfect toy for a young child who wants to play their own tunes and stories but who isn t ready for an iPad or smart speaker of their own Yoto s cute design and blocky pixel like display looks distinctly retro It s detailed enough for kids to make out images but it s insufficient for video which should actually be good news for parents worried about too much screen time Yoto calls the player a “carefully connected speaker You bring it online during the initial setup but from there kids can access safe songs and other content through physical cards ーDevindra Hardawar Senior EditorBuy Yoto Player starter pack at Amazon Kiwi Crates subscriptionKiwi CratesI am admittedly a sucker for a good subscription box But Kiwi Crate is the only one that doesn t feel like an indulgence Each month my three year old gets a collection of simple DIY toys crafts and games built around a theme For instance a recent box was all about bioluminescent animals Inside was a plush lightning bug that we had to stuff ourselves and shape using hair ties a mushroom that had us painting a Slurpee lid and then dotting it with glow in the dark stickers and a dancing glowing jellyfish as well as several window clings of sea creates for him to create scenes with Past kits have covered farm life dinosaurs and simple machines like ramps The stuff inside the box is usually pretty simple think cardboard felt and wood It s definitely not built to last but my kid has gotten plenty of use out of each piece The best part is the crates will grow with him As he gets older the projects will get more complex and the price will go up Later boxes include everything from screen printing tools to trebuchet kits and even robots ー T O Buy Kiwi Crates starting at a monthKano PCEngadgetThe Kano PC may look at first like a cheap Surface knock off but based on our testing it s also a perfect introduction to the computer world for young children It s partially DIY ーthe base unit is a Windows tablet with a pre installed CPU memory and storage but kids will have to plug in a colorful battery and speaker module to get it going Kano encourages youngsters to take a close look at all of the PC s clearly labeled hardware with the bundled magnifying glass And once they get going it s still a decently capable Windows PC with a Celeron CPU GB of RAM and a p webcam Heck it even comes with a keyboard cover something Microsoft still hasn t bundled with the Surface tablets ーD H Buy Kano PC at Microsoft Playtime Engineering BlipbloxWill Lipman Photography for EngadgetThe Blipblox may look like a simple noise maker for kids but this gadget is much more than just a toy While the device is loaded with melodies and a synchronized light show it also packs a capable digital synthesizer engine There s an oscillator with the usual assortment of synth parameters along with an amp envelope two LFOs modulation envelope and a low pass filter The Blipblox also has a MIDI input for use with a keyboard or other accessories in addition to a ¼ inch output Lastly it runs on three AA batteries or plugged in via a USB cable Blipblox can teach kids about music through a basic approach to instruments and synthesis but its features are advanced enough to offer noise making magic for parents too ーB S Buy Blipbox at Amazon Montessori Busy BoardEngadgetMy kids are currently fascinated with snaps zippers and closures which is fun because it means it s easy to amuse them but awkward too because they often decide to undo the closures on the shirt I m wearing A busy board capitalizes on this curiosity by offering several different clasps snaps zippers buttons and openings for little ones to work their fingers on It intrigues children by activating their senses and helps them develop their fine motor skills and problem solving by using real world obstacles It also adheres to the Montessori philosophy of simple wooden toys that help children explore the world around them through play The deMoca busy board is one of my favorites because it has bright eye catching colors and sensory activities including a zipper a buckle a latch and Velcro It s easy to bring along on trips and deMoca also makes a “Quiet Book ーa soft cover fabric version that s washable ー A B Buy busy board at Amazon 2022-07-20 13:30:09
海外TECH Engadget With a Samsung TV and Game Pass Ultimate, I don’t need to buy an Xbox https://www.engadget.com/samsung-gaming-hub-game-pass-ultimate-i-dont-need-an-xbox-130051254.html?src=rss With a Samsung TV and Game Pass Ultimate I don t need to buy an XboxIt took a bit of time but you can now stream Xbox games from your TV without a Microsoft console in sight As long as you have a Samsung TV The Xbox app is now available on Samsung s latest smart TVs and monitors alongside apps for rival gaming services like Stadia and NVIDIA s GeForce Now It s bigger news however when a console maker ーand its huge catalog of games on Game Pass Ultimate offers game streaming straight from your TV I had an extended play session during a launch showcase at Samsung s London event space and it made me a PlayStation gamer an offer I can t refuse Play Xbox games from the cloud with no additional hardware aside from a Bluetooth connected controller I can even use my DualSense controller because I m that kind of person This will be familiar news to anyone that s already streamed games with Xbox Cloud or Google s Stadia but all the games I tried were smooth with incredibly swift load speeds Some early previews of Samsung s Gaming Hub kept gaming media to familiar hits but with Xbox rolling out the entire Game Pass experience I got to test its limits with Flight Simulator a game that benefits from speedier load times and avoiding those pesky huge patch files On a big TV even while standing up playing Flight Simulator turns into a meditative experience Type in your destination for an exploration flight or easier on a controller set your cursor on the world map and just fly and fly and fly That s what I did and I started to hate that I ll never be able to do this on my PS I m sold on the idea already I just don t have a Samsung TV Damn you Microsoft XboxIt s not perfect of course Don t expect K or variable refresh rates beyond fps this is still cloud gaming although we get K streams on Stadia The bigger question is whether Xbox s games can stream on Samsung s Game Hub stably for several hours on end and that s something that can only be answered after extensive testing What if your connection hiccups and you lose that major progress made in Red Dead Redemption For now the hub is limited to Samsung s TVs and monitors and it s unclear exactly how Microsoft will deliver Xbox Cloud to other big screens not connected to its consoles For Samsung s part its spokesperson said the company hoped to “extend the device coverage in the near future Microsoft s own streaming stick similar to a Chromecast seemed like the obvious solution but the company said earlier this year that it was taking a new approach with its game streaming devices so that s not happening for a while at least It hasn t elaborated further besides teasing “a new approach that will allow us to deliver Xbox Cloud Gaming to more players around the world in the future That could mean a dedicated device or it could be exactly what I m testing today the TV app coming to more TVs Hopefully some that already exist Hopefully mine Buying a new TV to avoid paying for a new console seems more than a little circuitous For now I m left waiting for a way to stream Xbox Cloud to my TV without a console Barring some particularly laborious workarounds it seems I ll be waiting a little longer 2022-07-20 13:00:51
海外TECH Engadget The OnePlus 10T 5G will be unveiled on August 3rd https://www.engadget.com/one-plus-is-launching-its-second-flagship-of-the-year-on-august-3rd-130035305.html?src=rss The OnePlus T G will be unveiled on August rdFollowing the launch of the OnePlus Pro early this year OnePlus has announced that it will launch another flagship phone in The OnePlus T G will make its debut in New York on August rd at AM ET marking the company s first in person event since nbsp The key selling point will be Qualcomm s latest and greatest chipset the Snapdragon Gen Mobile Platform As we detailed in May that promises faster and longer lasting Android flagships thanks to a percent improvement in processing speed and percent reduction in power Xiaomi also recently announced that its Redmi K phone would arrive soon with that chipset nbsp The device will premiere with OxygenOS OnePlus s take on Android Along with the latest Android features it s expected to introduce improved UI personalization design consistency and more The T G will be launched globally meaning you should be able to buy one both in the US and Europe OnePlus didn t reveal any other specs or details other than the textured back shown in the teaser image We ll learn more when it launches on August rd at AM ET PM BST and OnePlus has more information here nbsp 2022-07-20 13:00:35
Cisco Cisco Blog EdCreate Foundation empowers students in India to pursue new opportunities https://blogs.cisco.com/csr/edcreate-foundation-empowers-students-in-india-to-pursue-new-opportunities skills 2022-07-20 13:00:59
Cisco Cisco Blog Taking Action to Create Equal Opportunities for Diverse Startup Founders and Venture Leaders https://blogs.cisco.com/news/taking-action-to-create-equal-opportunities-for-diverse-startup-founders-and-venture-leaders Taking Action to Create Equal Opportunities for Diverse Startup Founders and Venture LeadersJoin Cisco at the Magnetic Aspire Summit where industry visionaries discuss their personal journeys and the challenges they faced in their technology startups and in the venture capital ecosystem They will uncover actions we can take to help level the playing field in venture capital and across the technology industry 2022-07-20 13:00:51
ニュース BBC News - Home London Fire Brigade had busiest day since World War Two, says London mayor https://www.bbc.co.uk/news/uk-62232654?at_medium=RSS&at_campaign=KARANGA unprecedented 2022-07-20 13:17:54
ニュース BBC News - Home Ukraine war: Russia's Lavrov says ready to expand war aims https://www.bbc.co.uk/news/world-europe-62231936?at_medium=RSS&at_campaign=KARANGA range 2022-07-20 13:32:58
ニュース BBC News - Home New nuclear power plant gets go-ahead https://www.bbc.co.uk/news/uk-england-suffolk-62235221?at_medium=RSS&at_campaign=KARANGA nuclear 2022-07-20 13:44:02
ニュース BBC News - Home EU told to prepare for Russian gas shut-off https://www.bbc.co.uk/news/business-62230201?at_medium=RSS&at_campaign=KARANGA halts 2022-07-20 13:24:44
ニュース BBC News - Home Wildfires rage in Greece, Spain and Italy as heatwave moves across Europe https://www.bbc.co.uk/news/world-europe-62235561?at_medium=RSS&at_campaign=KARANGA italy 2022-07-20 13:33:30
ニュース BBC News - Home Trains cancelled and delayed after heatwave damage https://www.bbc.co.uk/news/business-62234461?at_medium=RSS&at_campaign=KARANGA network 2022-07-20 13:49:27
ニュース BBC News - Home EuroMillions: UK ticket-holder claims £195m record jackpot https://www.bbc.co.uk/news/uk-62240298?at_medium=RSS&at_campaign=KARANGA lottery 2022-07-20 13:27:20
ニュース BBC News - Home Henrik Stenson removed as Europe's Ryder Cup captain https://www.bbc.co.uk/sport/golf/62237705?at_medium=RSS&at_campaign=KARANGA effect 2022-07-20 13:43:06
北海道 北海道新聞 へメロカリス、そよ風に揺れ 札幌・百合が原公園で見ごろ https://www.hokkaido-np.co.jp/article/708157/ 札幌市北区 2022-07-20 22:36:00
北海道 北海道新聞 ポンチセ建て替えへ地鎮祭 札幌市アイヌ文化交流センター https://www.hokkaido-np.co.jp/article/708156/ 建て替え 2022-07-20 22:27:00
北海道 北海道新聞 室工大、最先端技術学ぶ「人材育成センター」開設 23年4月に https://www.hokkaido-np.co.jp/article/708151/ 人材育成 2022-07-20 22:20:36
北海道 北海道新聞 海峡往来、今昔に思い巡らせ 函館発の青森縄文ツアーに記者参加 https://www.hokkaido-np.co.jp/article/708155/ 青森 2022-07-20 22:17:00
北海道 北海道新聞 東京Vが勝利、8強出そろう サッカー天皇杯 https://www.hokkaido-np.co.jp/article/708154/ 全日本選手権 2022-07-20 22:14:00
北海道 北海道新聞 サッカー、パリSGが川崎に勝利 親善試合、国立競技場は盛況 https://www.hokkaido-np.co.jp/article/708153/ 国立競技場 2022-07-20 22:11:00
北海道 北海道新聞 ソ3―17楽(20日) 楽天が今季最多得点で大勝 https://www.hokkaido-np.co.jp/article/708152/ 先頭打者本塁打 2022-07-20 22:11:00
北海道 北海道新聞 NY円、138円前半 https://www.hokkaido-np.co.jp/article/708150/ 外国為替市場 2022-07-20 22:02:00
北海道 北海道新聞 親ロ派地域以外の確保を明言 ラブロフ氏、南部2州も視野に https://www.hokkaido-np.co.jp/article/708149/ 軍事支援 2022-07-20 22:02:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)