What You Learned
Great job in this chapter. You added a complex feature to an existing JavaScript application with Elm. You embedded an Elm application inside an existing React application. Then, you created your own onChange event handler and used a port to notify JavaScript when a user selected images. You used a FileReader and promises to encode images into Base64 URLs and sent the URLs back to Elm through another port. Finally, you used flags to display previously uploaded images when embedding the Elm application.
You’re now ready to introduce Elm into your JavaScript applications. You can add new features with Elm and convert existing parts of your application to Elm. Over time, you can migrate an entire application to Elm.
In fact, try ...
Get Programming Elm now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.