I have a little problem with small application where in big shortcut have a task to add record to string array or object array as long as next record will be display over the DIV width so function transport him to another div. I want make this app elastic event if someone changed dimension of div application will control records.
I figure it out in this way :
create table of objects/strings in useState
render array in div
adding record to array
check actual length of array
if next record go outside array then render him in DIV above
Add new record to new array
Render state through Portal in specific div
I guess I won’t do this in one array caused by Portal. I don’t know maybe would better idea to display actual content of array in div on the begining or after add next record.
So, what Should I modify in this algorythm to run good. If this will be useful I can add source code
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.