If I wanted to use value returned by future to lets say display it on body element, would I do that in fork function like this:
const toJson = response => attemptP(() => response.json())
const germany = attemptP(() => fetch('https://restcountries.com/v3.1/name/germany'))
.pipe(chain(toJson))
.pipe(fork(setBodyText('Not Found'))(setBodyText))
Or is there some way to store a value returned by the fork function similar to how promises have "await"
If I wanted to use value returned by future to lets say display it on body element, would I do that in fork function like this:
Or is there some way to store a value returned by the fork function similar to how promises have "await"