Coder Social home page Coder Social logo

Comments (2)

huss avatar huss commented on September 21, 2024

Another issue with modals is that some take props for show and the close function. Hopefully the changes for this issue could also eliminate those and maybe all props.

from oed.

ChrisMart21 avatar ChrisMart21 commented on September 21, 2024

The same idea has also occured to me, and I've got some changes to admin pages undergoing tentative development that address this concept.
With the migration to rtk, react-router was also updated to v6. This introduced <Outlets/> which is currently being utilized for the admin pages.
The approach I've begin to look into is using a single modal, who's contents get dynamically swapped depending on the page, etc.
This differs with the current approach that creates a modal for each entity view.

This Admin Outlet has a SharedModal between all admin pages.
The only real difference to the current implementation of the current the admin pages, is that the entity views only return the body contents instead of a full modal. While there are minor changes to the admin pages, the functionality is largely the same, except for the return value which now returns the modal 'body, only. The new approch would still use react-state, but will also be saving backedup local edits to the redux state. So previous code will likely not change much for many of the components.

from oed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.