Add/Remove Widgets from Local Storage - reactjs

Problem: Removed widgets appear after refreshing screen
Understanding of problem: Major issue consist in rendering items state. I was trying to save current state in Local Storage and after use it to render new items. Unfortunately this idea is not enough, because I cannot update it in live
Example of same project with exactly same problem: https://codesandbox.io/s/dg3tj
Documentation https://github.com/react-grid-layout/react-grid-layout
Note: I was looking to any response but unfortunately no luck. Hopefully someone will explain or show one working example
Same question: visit

Related

How does Stackoverflow highlight the answers with the sharable link with pagination for answers?

When we get a sharable link for an answer here, It gives the link with a hash parameter and when the link is loaded, it scrolls down and highlights the particular answer with a color. It works even if there are a lot of answers with pagination enabled. It automatically goes to the page and highlights the answer. How does that work?
I am working on a project where the situation is kind of the same as this and I have managed to achieve this without pagination. I have used React JS(along with react-router-dom for routes) for the front end and Django Rest Framework for the backend.
I have a server-side pagination enabled list of answers and I can travel through pages in the front-end as well. But like earlier it does not highlight a particular answer with the hash parameter in the url if that answer is not on the front page. I have to manually give the page number where the answer exists and that is the only way it works for now.
Is there any way to travel though pages and find the answer automatically and highlight it?
Can I do the same thing as it does here in Stackoverflow with these frameworks and if yes, how?
Any answer would be great!
Thank you!

I'm having trouble with the layout in tablet and mobile views on my portfolio and elements aren't displaying properly

I'm hoping someone can help direct me with troubleshooting for my portfolio page. I'm currently having issues with a few things and I'm not sure why or how to deal with them. Whenever I try to view them in tablet/mobile views on the deployed link the layout is completely different than when I run a live server with npm start.
The first issue about section in mobile and tablet views displays each paragraph in columns and the black background doesn't cover all of the text or the image.
The second issue is the contact page doesn't display the links on mobile even though the text color is set to black and the contact header doesn't show up on the page.
It was made in React. Below will be the deployed link and link to the github.
https://refactored-potato.netlify.app/
https://github.com/GSometimes/refactored-potato
I would really appreciate any help or guidance on sorting this out.
Thank you.
first piece of advice is that you have used TOO MUCH CSS, please use only what you really need. You don't need every css property to use on every element.
Your text/paragraphs are showing in column as their parent's display style is set first as inline and then flex. Either don't use it or write display: block

Piwik (Matomo) creating multiple visits in single session

One visit is getting broken down into multiple visits (10+ in some cases).
I’m pretty sure that it’s the same session because all the visit data is identical. Most visits have single action/event.
There can’t be a visit with single Event.
Event is only triggered after the page is loaded. Hence, it would have at least 1 additional page action.
Did anyone face this issue before? Any idea about how to fix this?
Make sure you're using latest Matomo version. if you can reproduce the issue consistently, for example create a small HTML page with the code to reproduce, then create a bug report at: www.github.com/matomo-org/matomo/issues/ and the team will investigate.

How to use the rehydration with mobx-persist

I am new to mobx-persist. I am not able to figure out how rehydration works in mobx-persist. I tried asking about it in github but got no reply so far. I am wondering if anyone here is able to point me the right direction.
The problem that I am trying to solve is to prevent losing the react states on the page refresh. I want to keep the stats in the session storage and load them back when the page is refreshed. (Note: I managed to do it by accessing the session storage directly from the react store but I thought that mobx-persist might do the better job.)
I created a sample here. https://github.com/michaelsync/js-lab/tree/master/mobx-persist-sample.
You can use the following command to run the sample.
yarn install
yarn start
It has two components called "entry" page and "result". User can enter something in "entry" page and show that data in the "result" page. There is one store called userDataStore that has only one property called data.
When you click on "Click Me" in the entry page, the data that you typed on text box will be saved in user data store. and it retrieves the data back from the result page.
The issue is that when I refresh the page, I still lost the react states. I guess it's because I don't understand how rehydration works in mobx-persist.
The steps to replicate the issue ~
run the program by using yarn start
enter something in textbox and click on "Click me" (It will redirect to the result page)
you will see what you entered in the result page.
Refresh the page (press F5) - the data will be lost.
Can someone please help me with the steps that I need to do in hydration and rehydration?
Note: I don't want to use any server-side code or isomorphic rendering to sync the states for now. using the session storage might be anti-pattern but I see it fit in my tiny project.

DotNetNuke edit navigation bar

Is there a decent way in DNN 7 to modify the navigation block at the top? I am completely lost.
I am using the "Awesome Cycles" content as a template for a class project. All I am trying to do is change out the word "us" in the navigation at the top for the word "me".
I'm sure there must be an easy way to do it, but I don't think I "speak the language" well enough to google this. I have been literally searching for three days, and I know I'm going to feel stupid once someone points it out but... Oh well.
Thanks in advance!
You are correct that you can simple change the Page Name in the page settings to control what displays in the Navigation. But be aware that changing a page name also changes the URL of that page.
Check out this video for how to avoid bad URLs after changing pages
http://www.dotnetnuke.com/Resources/Video-Library/Viewer/Video/213/View/Details/Renaming-a-Page-in-DotNetNuke.aspx
tl;dr - create a new page, with the old name, make it hidden (not in the menu), and have it redirect to the new page.

Resources