javascript - Where to write dom manipulation after render? Reactjs -


i update dom accordingly url of page, after page has loaded.

essentially in render: fetching data through api, mapping data different buttons.

dom manipulation do: click button related url, after component has rendered. if url = "/topica" -> click button related topica.

use onload. script have on /topica or event have fire /topica page. if not can use localstorage object set button click true or false if redirecting page , use conditional statement fire call.

<body onload="script();"> or document.onload = function() {} or window.onload = function() {}


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -