Edit July 2019: as of React 16.8, a first class solution to this problem has been implemented into React through the hooks update. The
useEffect hook can replace this component. Equivalent code:
useEffect(() => fetchData(props.id), [props.id]).
Getting Webpack working with Phoenix was was more of an ordeal than expected. Part of the issue was out of date documentation, the other part was overly complicated solutions. Once it was working though, the process actually made a lot of sense, so I’ve documented the…