I'm receiving the Id (number type) and a value (string type) from the backend and I'm passing it concatenated as a whole to another component:
const id = 12;
const value = "my_string_may_include_numbers_and_spaces";
const valueToSend = `${id} ${value}`
<MyComponent propString={valueToSend} />
Is there any way to take the prop and extract both values from inside MyComponent ?
id and value are separated by space but I could include anything in between, like * or % if that helps, I just haven't found a way to do it.
Thanks in advance