react-boilerplate

react-boilerplate

🔥 A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices.

Member Since 4 years ago

Everywhere

Experience Points
0
follower
Lessons Completed
0
follow
Best Reply Awards
7
repos
Activity
Dec
6
1 day ago
Activity icon
fork

Rekt-Dev forked react-boilerplate/react-boilerplate

⚡ :fire: A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices.
Rekt-Dev MIT License Updated
fork time in 15 hours ago
Activity icon
fork

Retosi forked react-boilerplate/react-boilerplate

⚡ :fire: A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices.
Retosi MIT License Updated
fork time in 1 day ago
Dec
5
2 days ago
Activity icon
fork

ceodev18 forked react-boilerplate/react-boilerplate

⚡ :fire: A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices.
ceodev18 MIT License Updated
fork time in 2 days ago
Dec
4
3 days ago
Activity icon
fork

techadilly forked react-boilerplate/react-boilerplate

⚡ :fire: A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices.
techadilly MIT License Updated
fork time in 3 days ago
Activity icon
fork

rdhksnvns forked react-boilerplate/react-boilerplate-cra-template

⚡ :fire: Setup Create React App with React Boilerplate. Highly scalable & Best DX & Performance Focused & Best practices.
rdhksnvns MIT License Updated
fork time in 3 days ago
Activity icon
issue

close-issue-app[bot] issue react-boilerplate/react-boilerplate

close-issue-app[bot]
close-issue-app[bot]

react router url params not working in production build

I am trying to upload a dummy static react app on DirectAdmin. I did search about it and i realized that it is possible to upload the files in build folder to show your app on a real server (cpanel guide):

I did it and everything works fine except routing with url params (path='/quotes/:quoteId/*') which shows white screen (renders nothing) when loading on web server. Here is my routing code:

function App() {
    return (
        <Layout>
            <Suspense fallback={<div className='centered'><LoadingSpinner/></div>}>
                <Routes>
                    <Route
                        path='/'
                        element={<Navigate
                            replace
                            to='/quotes'/>}/>
                    <Route
                        path='/quotes/'
                        element={<AllQuotes/>}/>
                    <Route
                        path='/quotes/:quoteId/*'
                        element={<QuoteDetail/>}/>
                    <Route
                        path='/new-quote'
                        element={<NewQuote/>}/>
                    <Route
                        path='*'
                        element={<NotFound/>}/>
                </Routes>
            </Suspense>
        </Layout>
    );
}

Basically I did these: 1. add "homepage" : "." in package.json 2. add basename in my BrowserRoute:

ReactDOM.render(
    <BrowserRouter basename="/testreact">
        <App />
    </BrowserRouter>, document.getElementById('root'));
3. npm run build
4. copy build folders into my DirectAdmin server directory
5. create .htaccess in root/testreact/ directory with these config:
<IfModule mod_rewrite.c>

  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /testreact/index.html [L]

</IfModule>

all the routes are working fine on web server and i have not found page which works fine with every wrong url, except the one with url params (which renders white screen with no elements):

<Route
   path='/quotes/:quoteId/*'
   element={<QuoteDetail/>}/>

Is there any solution for this?! Is there any new .htaccess or config i could add to solve the problem with routes with url params on web server?

Activity icon
issue

close-issue-app[bot] issue comment react-boilerplate/react-boilerplate

close-issue-app[bot]
close-issue-app[bot]

react router url params not working in production build

I am trying to upload a dummy static react app on DirectAdmin. I did search about it and i realized that it is possible to upload the files in build folder to show your app on a real server (cpanel guide):

I did it and everything works fine except routing with url params (path='/quotes/:quoteId/*') which shows white screen (renders nothing) when loading on web server. Here is my routing code:

function App() {
    return (
        <Layout>
            <Suspense fallback={<div className='centered'><LoadingSpinner/></div>}>
                <Routes>
                    <Route
                        path='/'
                        element={<Navigate
                            replace
                            to='/quotes'/>}/>
                    <Route
                        path='/quotes/'
                        element={<AllQuotes/>}/>
                    <Route
                        path='/quotes/:quoteId/*'
                        element={<QuoteDetail/>}/>
                    <Route
                        path='/new-quote'
                        element={<NewQuote/>}/>
                    <Route
                        path='*'
                        element={<NotFound/>}/>
                </Routes>
            </Suspense>
        </Layout>
    );
}

Basically I did these: 1. add "homepage" : "." in package.json 2. add basename in my BrowserRoute:

ReactDOM.render(
    <BrowserRouter basename="/testreact">
        <App />
    </BrowserRouter>, document.getElementById('root'));
3. npm run build
4. copy build folders into my DirectAdmin server directory
5. create .htaccess in root/testreact/ directory with these config:
<IfModule mod_rewrite.c>

  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /testreact/index.html [L]

</IfModule>

all the routes are working fine on web server and i have not found page which works fine with every wrong url, except the one with url params (which renders white screen with no elements):

<Route
   path='/quotes/:quoteId/*'
   element={<QuoteDetail/>}/>

Is there any solution for this?! Is there any new .htaccess or config i could add to solve the problem with routes with url params on web server?

close-issue-app[bot]
close-issue-app[bot]

This issue was automatically closed because it does not follow either one of our templates. Please open a new issue and fill out the template that appears instead of deleting it. If you're reporting an issue, it's especially important that you provide detailed steps for how to reproduce it.

Activity icon
issue

AhmadrezaPRO issue react-boilerplate/react-boilerplate

AhmadrezaPRO
AhmadrezaPRO

react router url params not working in production build

I am trying to upload a dummy static react app on DirectAdmin. I did search about it and i realized that it is possible to upload the files in build folder to show your app on a real server (cpanel guide):

I did it and everything works fine except routing with url params (path='/quotes/:quoteId/*') which shows white screen (renders nothing) when loading on web server. Here is my routing code:

function App() {
    return (
        <Layout>
            <Suspense fallback={<div className='centered'><LoadingSpinner/></div>}>
                <Routes>
                    <Route
                        path='/'
                        element={<Navigate
                            replace
                            to='/quotes'/>}/>
                    <Route
                        path='/quotes/'
                        element={<AllQuotes/>}/>
                    <Route
                        path='/quotes/:quoteId/*'
                        element={<QuoteDetail/>}/>
                    <Route
                        path='/new-quote'
                        element={<NewQuote/>}/>
                    <Route
                        path='*'
                        element={<NotFound/>}/>
                </Routes>
            </Suspense>
        </Layout>
    );
}

Basically I did these: 1. add "homepage" : "." in package.json 2. add basename in my BrowserRoute:

ReactDOM.render(
    <BrowserRouter basename="/testreact">
        <App />
    </BrowserRouter>, document.getElementById('root'));
3. npm run build
4. copy build folders into my DirectAdmin server directory
5. create .htaccess in root/testreact/ directory with these config:
<IfModule mod_rewrite.c>

  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /testreact/index.html [L]

</IfModule>

all the routes are working fine on web server and i have not found page which works fine with every wrong url, except the one with url params (which renders white screen with no elements):

<Route
   path='/quotes/:quoteId/*'
   element={<QuoteDetail/>}/>

Is there any solution for this?! Is there any new .htaccess or config i could add to solve the problem with routes with url params on web server?

Activity icon
issue

close-issue-app[bot] issue react-boilerplate/react-boilerplate

close-issue-app[bot]
close-issue-app[bot]

react router url params not working in production build

I am trying to upload a dummy static react app on DirectAdmin. I did search about it and i realized that it is possible to upload the files in build folder to show your app on a real server (cpanel guide):

I did it and everything works fine except routing with url params (path='/quotes/:quoteId/*') which shows white screen (renders nothing) when loading on web server. Here is my routing code:

function App() {
    return (
        <Layout>
            <Suspense fallback={<div className='centered'><LoadingSpinner/></div>}>
                <Routes>
                    <Route
                        path='/'
                        element={<Navigate
                            replace
                            to='/quotes'/>}/>
                    <Route
                        path='/quotes/'
                        element={<AllQuotes/>}/>
                    <Route
                        path='/quotes/:quoteId/*'
                        element={<QuoteDetail/>}/>
                    <Route
                        path='/new-quote'
                        element={<NewQuote/>}/>
                    <Route
                        path='*'
                        element={<NotFound/>}/>
                </Routes>
            </Suspense>
        </Layout>
    );
}

Basically I did these: 1. add "homepage" : "." in package.json 2. add basename in my BrowserRoute:

ReactDOM.render(
    <BrowserRouter basename="/testreact">
        <App />
    </BrowserRouter>, document.getElementById('root'));
3. npm run build
4. copy build folders into my DirectAdmin server directory
5. create .htaccess in root/testreact/ directory with these config:
<IfModule mod_rewrite.c>

  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /testreact/index.html [L]

</IfModule>

all the routes are working fine on web server and i have not found page which works fine with every wrong url, except the one with url params (which renders white screen with no elements):

<Route
   path='/quotes/:quoteId/*'
   element={<QuoteDetail/>}/>

Is there any solution for this?! Is there any new .htaccess or config i could add to solve the problem with routes with url params on web server?

Activity icon
issue

close-issue-app[bot] issue comment react-boilerplate/react-boilerplate

close-issue-app[bot]
close-issue-app[bot]

react router url params not working in production build

I am trying to upload a dummy static react app on DirectAdmin. I did search about it and i realized that it is possible to upload the files in build folder to show your app on a real server (cpanel guide):

I did it and everything works fine except routing with url params (path='/quotes/:quoteId/*') which shows white screen (renders nothing) when loading on web server. Here is my routing code:

function App() {
    return (
        <Layout>
            <Suspense fallback={<div className='centered'><LoadingSpinner/></div>}>
                <Routes>
                    <Route
                        path='/'
                        element={<Navigate
                            replace
                            to='/quotes'/>}/>
                    <Route
                        path='/quotes/'
                        element={<AllQuotes/>}/>
                    <Route
                        path='/quotes/:quoteId/*'
                        element={<QuoteDetail/>}/>
                    <Route
                        path='/new-quote'
                        element={<NewQuote/>}/>
                    <Route
                        path='*'
                        element={<NotFound/>}/>
                </Routes>
            </Suspense>
        </Layout>
    );
}

Basically I did these: 1. add "homepage" : "." in package.json 2. add basename in my BrowserRoute:

ReactDOM.render(
    <BrowserRouter basename="/testreact">
        <App />
    </BrowserRouter>, document.getElementById('root'));
3. npm run build
4. copy build folders into my DirectAdmin server directory
5. create .htaccess in root/testreact/ directory with these config:
<IfModule mod_rewrite.c>

  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /testreact/index.html [L]

</IfModule>

all the routes are working fine on web server and i have not found page which works fine with every wrong url, except the one with url params (which renders white screen with no elements):

<Route
   path='/quotes/:quoteId/*'
   element={<QuoteDetail/>}/>

Is there any solution for this?! Is there any new .htaccess or config i could add to solve the problem with routes with url params on web server?

close-issue-app[bot]
close-issue-app[bot]

This issue was automatically closed because it does not follow either one of our templates. Please open a new issue and fill out the template that appears instead of deleting it. If you're reporting an issue, it's especially important that you provide detailed steps for how to reproduce it.

Activity icon
issue

AhmadrezaPRO issue react-boilerplate/react-boilerplate

AhmadrezaPRO
AhmadrezaPRO

react router url params not working in production build

I am trying to upload a dummy static react app on DirectAdmin. I did search about it and i realized that it is possible to upload the files in build folder to show your app on a real server (cpanel guide):

I did it and everything works fine except routing with url params (path='/quotes/:quoteId/*') which shows white screen (renders nothing) when loading on web server. Here is my routing code:

function App() {
    return (
        <Layout>
            <Suspense fallback={<div className='centered'><LoadingSpinner/></div>}>
                <Routes>
                    <Route
                        path='/'
                        element={<Navigate
                            replace
                            to='/quotes'/>}/>
                    <Route
                        path='/quotes/'
                        element={<AllQuotes/>}/>
                    <Route
                        path='/quotes/:quoteId/*'
                        element={<QuoteDetail/>}/>
                    <Route
                        path='/new-quote'
                        element={<NewQuote/>}/>
                    <Route
                        path='*'
                        element={<NotFound/>}/>
                </Routes>
            </Suspense>
        </Layout>
    );
}

Basically I did these: 1. add "homepage" : "." in package.json 2. add basename in my BrowserRoute:

ReactDOM.render(
    <BrowserRouter basename="/testreact">
        <App />
    </BrowserRouter>, document.getElementById('root'));
3. npm run build
4. copy build folders into my DirectAdmin server directory
5. create .htaccess in root/testreact/ directory with these config:
<IfModule mod_rewrite.c>

  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /testreact/index.html [L]

</IfModule>

all the routes are working fine on web server and i have not found page which works fine with every wrong url, except the one with url params (which renders white screen with no elements):

<Route
   path='/quotes/:quoteId/*'
   element={<QuoteDetail/>}/>

Is there any solution for this?! Is there any new .htaccess or config i could add to solve the problem with routes with url params on web server?

Previous