At Codemancers, we believe every day is an opportunity to grow. This section is where our team shares bite-sized discoveries, technical breakthroughs and fascinating nuggets of wisdom we've stumbled upon in our work.
1. i learned how to do filtering and sorting with the api by passing params. 2. i learned how to write test cases for the components like filtering and sorting. 3. i learned how to mock api using the jest.
Published
Author
Rishav Raj
System Analyst
1.Tomorrow, I learnt how to utilise a single component to prevent code repetition and use that component in every component to prevent code repetition, 2. To make the API scalable, we need to create various methods to call it if I had many end points.
Published
Author
Keshav Chakravarthy
You can use cloudflared to expose apps running on localhost using a dedicated domain, and HTTPS • For hosting using a random URL just run cloudflared tunnel --url http://localhost: • For an owned domain, there are a bunch more steps. ◦ Prerequisites: ▪︎ You need a domain name that you own. Can buy one for an year for <200 Rs ▪︎ Create a Cloudflare account. You will be asked to login to dash.cloudflare.com ▪︎ Follow the instructions including the installation instructions in https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local
Published
Author
Keshav Chakravarthy
Published
Author
Ashwani Kumar Jha
Senior System Analyst
TypeScript Pick utility allows us to create a new type by picking a subset of properties from an existing type. Instead of duplicating field declarations we can use Pick utility to extract new types.
Code
type AdminUser = {id:number;name:string;email:string;phone:string;password:string;age:number;isAdmin:boolean;...}
Code
typeBasicUser=Pick;
Published
Author
Rishav Raj
System Analyst
today i learned how to use storybook in next js with typescript and i also build some story of the components and today i learn how next js work and i also fetch api data in next js with the typescript and i also write the test cases in next js by using the react testing library and jest and i learned how to write testcases in react js with the help of typescript
Published
Author
Ayush Srivastava
System Analyst
A modal is a popup that when appears on the screen we cannot interact with any other element on the webpage apart from the modal. On other hand a dialog is a popup that when appears on the screen we can still interact with other element on the webpage
By default a dialog element will be hidden unless you add the open attribute to your dialog
Code
You can see me
It is not advised to use the open attribute directly, though, as that only allows you to open a non-modal dialog. Instead, you should use the show() and showModal() JavaScript methods.
Code
constdialog=document.querySelector("dialog")dialog.show() // Opens a non-modal dialogdialog.showModal() // Opens a modal
To close a dialog element you just need to use the close() method. Alternatively, if your dialog element is a modal you can use the Esc key to close it.
Code
constdialog=document.querySelector("dialog")dialog.close() // Closes the dialog
Published
Author
Rishav Raj
System Analyst
today i learned 1. All the basics of typescript and i also implement for fetching the api 2. i learned tailwind css and also implement styles in the component using tailwind css. so basically today i learn how typescript work, how to implement typescript, how it is useful in development and how to use and implement tailwind css.
Published
Author
Syed Sibtain
System Analyst
When we have conflicts between main and production, we cannot open PR directly. We do the following: 1. git fetch and then go to production -> git checkout production 2. Create a new branch from production -> git checkout -b 3. Pull latest changes from main -> git pull origin main or git merge main 4. Resolve conflicts 5. Push the changes and create a pull request with base branch as production 6. And chill 🙂
Showing 46 to 48 of 83 results
Ready to Build Something Amazing?
Codemancers can bring your vision to life and help you achieve your goals