7. Portals and Refs
Learning Objectives
By the end of this chapter, you will be able to do the following:
Use direct DOM element access to interact with elements
Expose the functions and data of your components to other components
Control the position of rendered JSX elements in the DOM
Introduction
React.js is all about building user interfaces, and, in the context of this book, it's about building web user interfaces specifically.
Web user interfaces are ultimately all about the Document Object Model (DOM). You can use JavaScript to read or manipulate the DOM. This is what allows you to build interactive websites: you can add, remove, or edit DOM elements after a page was loaded. This can be used to add or remove overlay windows ...
Get React Key Concepts 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.