Comments (15)
Mail.js is now rewritten using hooks, #24
from genesia.
My proposal in #29 , what do you think? @adeelibr @ccampean
from genesia.
@adeelibr Good advice! I consider to implement it on next PR, I can search more services like mailnesia
from genesia.
I am making a PR for this.
Change this file to Hooks only? https://github.com/Remeic/genesia/blob/master/src/Mail.js
Also should this be dumb functional component only https://github.com/Remeic/genesia/blob/master/src/App.js?
from genesia.
@adeelibr hello! Thanks for contributing, I think you can implement hooks only in mail.js
from genesia.
@ccampean I was about to make a PR when i saw this :D Thank you for the heads up :)
from genesia.
@adeelibr if you want, send the PR, so we compare them, I also wrote my own version with hooks. we can learn something more
from genesia.
I like the fact that the component is cleaner now.
from genesia.
@Remeic looks good to me.
from genesia.
@ccampean i see your PR, i prefer don't link suffix with useState, because is immutable string.
Can I know why you chose to use useState? maybe something escapes me.
from genesia.
I missed that variable. It should be outside of state's component.
from genesia.
@ccampean No problem, I'm here to learn. Thanks again!
from genesia.
I think it should inside the state component, because getComposedMail
is used as a function in the state component that takes in 2 params, assuming there can be multiple suffexes
for different components, I think it's better if it stays inside the component.
from genesia.
@adeelibr so you advice to move suffix in the state of component, in case there are multiple suffixes, right?
from genesia.
Yes, & if you want more control over the suffixes
just pass a suffix
prop down your component, and have defaultProp
for suffix
= somerandomvalue
in case no one passes the suffix
prop.
from genesia.
Related Issues (11)
- Write better README HOT 5
- Add Animation HOT 1
- Design new UI HOT 8
- Add more temp email services HOT 3
- Open mailnesia directly in inbox HOT 4
- Add more temp email services 2021 HOT 3
- Use Material UI HOT 2
- Create some tests HOT 1
- Set up circle ci and travis HOT 3
- Copy Email when page is ready HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genesia.