I have a React app that can be embedded several times on a single html page. Each time the html tag can come with a different data-*
attribute that is used for initialisation of the app:
<div class="my-app" data-my-config="SOME_ENCODED_JSON_PROPERTIES" />
Depending on the passed SOME_ENCODED_JSON_PROPERTIES
the app's redux store is to be initilized with a different initialState
. Reading the docs and examples on initialState, the initialState is always set from some static const
variables - how can it be set at "runtime" passed on the initial data-my-config
attribute?