Blog image

HHH

# React Native + NativeWind Template A minimal but robust template for React Native projects using NativeWind (TailwindCSS), Expo Router, and TypeScript with built-in dark/light theme support. ## šŸš€ Quick Start ```sh git clone https://github.com/SalehAhmed10/Expo-ReactNative-NativeWind-Tailwind-Template.git ``` ``` cd Expo-ReactNative-NativeWind-Tailwind-Template npm install npx expo start ``` ## šŸ“¦ What's Included - āš”ļø Expo Router for navigation - šŸŽØ NativeWind (TailwindCSS) for styling - šŸŒ“ Dark/Light theme with system sync - šŸ“± Responsive design ready - šŸ” TypeScript for type safety ## šŸŽØ Theme System The template includes a complete theme system with: - System theme detection - Manual theme toggle - HSL color system with opacity support - Consistent styling across light/dark modes ## āš ļø Known Issues & Fixes ### 1. NativeWind Babel Error **Fix**: Use NativeWind version 2.0.11 json { "dependencies": { "nativewind": "^2.0.11" } } ## šŸ“ Project Structure ā”œā”€ā”€ app/ │ ā”œā”€ā”€ layout.tsx # Root layout with theme provider │ ā”œā”€ā”€ index.tsx # Home screen │ └── +not-found.tsx # 404 page ā”œā”€ā”€ components/ │ └── ThemeToggle.tsx # Theme toggle component ā”œā”€ā”€ context/ │ └── ThemeProvider.tsx # Theme management ā”œā”€ā”€ babel.config.js ā”œā”€ā”€ tailwind.config.js # Theme configuration └── tsconfig.json ## šŸ›  Configuration Files ### tailwind.config.js Contains theme colors and configuration. Modify this file to customize your color scheme. ### babel.config.js Includes necessary configuration for NativeWind. ## šŸ“± Supported Platforms - iOS - Android - Web (with appropriate configuration) ## šŸ“„ License MIT ## šŸ¤ Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Read Post Here
Science
Saleh Ahmed
Blog image

TEST POST

# HELLO WORLD ### pragraph > assadadasdassssssssssd *** *** ```js const text = "hello" ``` --- ``` asdadasdsad ``` ![image](https://images.pexels.com/photos/540518/pexels-photo-540518.jpeg)

Read Post Here
Science
Saleh Ahmed
Blog image

Test MD Post

# [react-markdown](https://www.npmjs.com/package/react-markdown#react-markdown) [![Build](https://github.com/remarkjs/react-markdown/workflows/main/badge.svg)](https://github.com/remarkjs/react-markdown/actions) [![Coverage](https://camo.githubusercontent.com/309067738fcaecc1a1ad533f432b8dae3cfadbde833e0acc986df58ab12637c2/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f72656d61726b6a732f72656163742d6d61726b646f776e2e737667)](https://codecov.io/github/remarkjs/react-markdown) [![Downloads](https://camo.githubusercontent.com/2368790bd3d7c9b3d9ff34d0feb924a6333d1d6d7af81310cb74920eae90a09a/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f72656163742d6d61726b646f776e2e737667)](https://www.npmjs.com/package/react-markdown) [![Size](https://camo.githubusercontent.com/34394cc46ae415c1b43e6e686f15493b031023d86864de70d91252a94e279ce7/68747470733a2f2f696d672e736869656c64732e696f2f62756e646c656a732f73697a652f72656163742d6d61726b646f776e)](https://bundlejs.com/?q=react-markdown) [![Sponsors](https://camo.githubusercontent.com/3d801487a7570a627780b2e75af3b7f07239ebb2b91e850e8e5a3eeddb91ff58/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f756e69666965642f73706f6e736f72732f62616467652e737667)](https://opencollective.com/unified) [![Backers](https://camo.githubusercontent.com/f5ea613d33171557007b46e32a55a43f9fbf0ad19059fc396c4be556ebf093b7/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f756e69666965642f6261636b6572732f62616467652e737667)](https://opencollective.com/unified) [![Chat](https://camo.githubusercontent.com/f28d582b8e09c11e9852250fcb90ba3b464842dc2bbb8ae38bb28e900a0267e8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636861742d64697363757373696f6e732d737563636573732e737667)](https://github.com/remarkjs/remark/discussions) React component to render markdown. ## [Feature highlights](https://www.npmjs.com/package/react-markdown#feature-highlights) - \[x\] **[safe](https://www.npmjs.com/package/react-markdown#security) by default** (no `dangerouslySetInnerHTML` or XSS attacks) - \[x\] **[components](https://www.npmjs.com/package/react-markdown#appendix-b-components)** (pass your own component to use instead of `<h2>` for `## hi`) - \[x\] **[plugins](https://www.npmjs.com/package/react-markdown#plugins)** (many plugins you can pick and choose from) - \[x\] **[compliant](https://www.npmjs.com/package/react-markdown#syntax)** (100% to CommonMark, 100% to GFM with a plugin) ## [Contents](https://www.npmjs.com/package/react-markdown#contents) - [What is this?](https://www.npmjs.com/package/react-markdown#what-is-this) - [When should I use this?](https://www.npmjs.com/package/react-markdown#when-should-i-use-this) - [Install](https://www.npmjs.com/package/react-markdown#install) - [Use](https://www.npmjs.com/package/react-markdown#use) - [API](https://www.npmjs.com/package/react-markdown#api) - [`Markdown`](https://www.npmjs.com/package/react-markdown#markdown) - [`defaultUrlTransform(url)`](https://www.npmjs.com/package/react-markdown#defaulturltransformurl) - [`AllowElement`](https://www.npmjs.com/package/react-markdown#allowelement) - [`Components`](https://www.npmjs.com/package/react-markdown#components) - [`ExtraProps`](https://www.npmjs.com/package/react-markdown#extraprops) - [`Options`](https://www.npmjs.com/package/react-markdown#options) - [`UrlTransform`](https://www.npmjs.com/package/react-markdown#urltransform) ## [Install](https://www.npmjs.com/package/react-markdown#install) This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). In Node.js (version 16+), install with [npm](https://docs.npmjs.com/cli/install): ```shell npm install react-markdown ``` In Deno with [`esm.sh`](https://esm.sh/): ```js import Markdown from 'https://esm.sh/react-markdown@9' ``` In browsers with [`esm.sh`](https://esm.sh/): ```html <script type="module"> import Markdown from 'https://esm.sh/react-markdown@9?bundle' </script> ``` ## [Use](https://www.npmjs.com/package/react-markdown#use) A basic hello world: ```js import React from 'react' import {createRoot} from 'react-dom/client' import Markdown from 'react-markdown' const markdown = '# Hi, *Pluto*!' createRoot(document.body).render(<Markdown>{markdown}</Markdown>) ``` Show equivalent JSX ```js <h1> Hi, <em>Pluto</em>! </h1> ``` Here is an example that shows how to use a plugin ([`remark-gfm`](https://github.com/remarkjs/remark-gfm), which adds support for footnotes, strikethrough, tables, tasklists and URLs directly): ```js import React from 'react' import {createRoot} from 'react-dom/client' import Markdown from 'react-markdown' import remarkGfm from 'remark-gfm' const markdown = `Just a link: www.nasa.gov.` createRoot(document.body).render( <Markdown remarkPlugins={[remarkGfm]}>{markdown}</Markdown> ) ```

Read Post Here
Science
Anon Factos